You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> my_crate/my_model.rs:35:1
|
35 | impl Into<MyModel> forMyModelBuilder<crate::generics::FooBarExists,crate::generics::FooBazExists, ..
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider to implement `From<my_model::MyModelBuilder<generics::FooBarExists, generics::FooBazExists, ...>>` instead
= help:for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
Note clippy --fix doesnt automatically fix this one.
A quick fix is adding an allow.
diff --git a/src/v2/codegen/impls.rs b/src/v2/codegen/impls.rs
index 6c29fff8..10dd8d38 100644
--- a/src/v2/codegen/impls.rs+++ b/src/v2/codegen/impls.rs@@ -315,6 +315,8 @@ impl<'a> ApiObjectImpl<'a> {
}
let needs_container = builder.needs_container();
++ f.write_str("\n#[allow(clippy::from_over_into)]")?;
f.write_str("\nimpl")?;
if builder.needs_any {
ApiObject::write_any_generic(f)?;
The text was updated successfully, but these errors were encountered:
jayvdb
added a commit
to jayvdb/paperclip
that referenced
this issue
Nov 2, 2022
The codegen output triggers https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/from_over_into.rs
Note
clippy --fix
doesnt automatically fix this one.A quick fix is adding an allow.
The text was updated successfully, but these errors were encountered: