Skip to content

warning when use clippy #133

@sbant

Description

@sbant

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()));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions