Explanation of existance of IntoSimpleExpr instead of Into<SimpleExpr>
#2327
Replies: 2 comments 4 replies
-
|
I agree. There are many Sometimes, only Sometimes, both traits are implemented, but it's not clear which one should be used. E.g., sea-query$ rg --stats 'Into<SimpleExpr>' | grep -P '\d+ matches'
138 matches
sea-query$ rg --stats 'IntoSimpleExpr' | grep -P '\d+ matches'
0 matches
sea-orm$ rg --stats 'Into<SimpleExpr>' | grep -P '\d+ matches'
3 matches
sea-orm$ rg --stats 'IntoSimpleExpr' | grep -P '\d+ matches'
15 matchesIf there's a good reason for these duplicated traits to exist, it should be documented on their definitions, along with expected use cases vs |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the questions. In most cases the reason is due to orphan rule. SeaORM don't own the underlying types (which is unfortunate, but I like having a crate boundary between SeaQuery / SeaORM), and can't do blanket impl. In particular, May be in some cases, the way we currently use them doesn't violate the orphan rule. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Please explain why there is an additional
IntoSimpleExprtrait instead of implementing Rust build-inIntotraitBeta Was this translation helpful? Give feedback.
All reactions