I use clippy in my project ( crates.io/crates/clippy )
And get these 3 warnings in generated .rs file:
src\message\proto\ts_ui.rs:108:5: 113:6 warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
src\message\proto\ts_ui.rs:108 pub fn mut_file_name<'a>(&'a mut self) -> &'a mut ::std::string::String {
src\message\proto\ts_ui.rs:153:47: 153:78 warning: redundant closure found. Consider using ::std::string::String::new in its place, #[warn(redundant_closure)] on by default
src\message\proto\ts_ui.rs:153 self.class_name.take().unwrap_or_else(|| ::std::string::String::new())
src\message\proto\ts_ui.rs:247:96: 247:130 warning: "unexpected wire type".to_owned() is faster, #[warn(str_to_string)] on by default
src\message\proto\ts_ui.rs:247 return ::std::result::Result::Err(::protobuf::ProtobufError::WireError("unexpected wire type".to_string()));
I use clippy in my project ( crates.io/crates/clippy )
And get these 3 warnings in generated .rs file:
src\message\proto\ts_ui.rs:108:5: 113:6 warning: explicit lifetimes given in parameter types where they could be elided, #[warn(needless_lifetimes)] on by default
src\message\proto\ts_ui.rs:108 pub fn mut_file_name<'a>(&'a mut self) -> &'a mut ::std::string::String {
src\message\proto\ts_ui.rs:153:47: 153:78 warning: redundant closure found. Consider using
::std::string::String::newin its place, #[warn(redundant_closure)] on by defaultsrc\message\proto\ts_ui.rs:153 self.class_name.take().unwrap_or_else(|| ::std::string::String::new())
src\message\proto\ts_ui.rs:247:96: 247:130 warning:
"unexpected wire type".to_owned()is faster, #[warn(str_to_string)] on by defaultsrc\message\proto\ts_ui.rs:247 return ::std::result::Result::Err(::protobuf::ProtobufError::WireError("unexpected wire type".to_string()));