Implemented the From method for all clear variants in Statement#2028
Implemented the From method for all clear variants in Statement#2028iffyio merged 5 commits intoapache:mainfrom
From method for all clear variants in Statement#2028Conversation
There was a problem hiding this comment.
For this I'm thinking it could make more sense to have the impls right next to the struct definitions (similar to how we do for display impls) vs a dedicated file for it?
There was a problem hiding this comment.
I created the different module as the main one is ever more massive, so I thought it best not to add even more to it. That being said, if you prefer avoiding specialised sub modules but keep the monolitic one I can copy everything back into it.
There was a problem hiding this comment.
Yeah I think we can move the impls close to the associated struct definitions, indeed it would be nice to split the large files but I imagine splitting based on e.g. statement types or similar dimension grouping related structs in the same file
iffyio
left a comment
There was a problem hiding this comment.
LGTM! Thanks @LucaCappelletti94!
cc @alamb
This PR introduces the
Fromtrait implementation for all variants of theStatementenum which are evidently mapped 1-1. There are a few variants which are not mappable in such a way, and therefore I refrained from creating one From impl for those. I have also added some.into()in the code where I have seen clear examples of statements conversion which may benefit from using theFromtrait instead of specifying the Statement variant. There are certainly more such cases, but I thought it was outside of the scope of this PR to replace such things.This PR closes #2020