If we want to comply with clippy we should maybe do that rewrite and handle the Result that write! returns
error: `format!(..)` appended to existing `String`
--> surf/src/file_system/path.rs:181:17
|
181 | pathspec.push_str(&format!("{}/", label));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> surf/src/lib.rs:18:68
|
18 | #![deny(missing_docs, unused_import_braces, unused_qualifications, warnings)]
| ^^^^^^^^
= note: `#[deny(clippy::format_push_string)]` implied by `#[deny(warnings)]`
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
error: `format!(..)` appended to existing `String`
--> surf/src/vcs/git/reference/glob.rs:106:13
|
106 | namespace_glob.push_str(&format!("refs/namespaces/{}/", n));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `write!` to avoid the extra allocation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
cargo clippy
warns about usingpush_str
since https://github.com/rust-lang/rust-clippy/commit/a86bf81e44dd530b69b686c556069bb8f6569c64 and recommends to usewrite!
instead. https://github.com/rust-lang/rust-clippy/issues/6261If we want to comply with
clippy
we should maybe do that rewrite and handle theResult
thatwrite!
returns