Closed fonskip closed 1 month ago
This is just a suggestion, your app, your choices !
Quality fixes based on cargo clippy -- -D clippy::pedantic :
cargo clippy -- -D clippy::pedantic
src/main.rs
;
enumerate()
zip(1u32..)
match arm
if ….is_ok()
src/utils.rs
String::from("")
String::new()
src/distrobox_handler.rs
var.iter()
&var
Also :
make update-translations
Thanks!
This is just a suggestion, your app, your choices !
Quality fixes based on
cargo clippy -- -D clippy::pedantic
:src/main.rs
;
at the end of functions that return nothing (https://rust-lang.github.io/rust-clippy/master/index.html#/clippy::semicolon_if_nothing_returned?groups=pedantic)enumerate()
) to u32 by replacingenumerate()
withzip(1u32..)
(https://rust-lang.github.io/rust-clippy/master/index.html#/cast_possible_truncation?groups=pedantic)match arm
that can be replaced byif ….is_ok()
(https://rust-lang.github.io/rust-clippy/master/index.html#/single_match_else?groups=pedantic and https://rust-lang.github.io/rust-clippy/master/index.html#/manual_assert?groups=pedantic)src/utils.rs
String::from("")
withString::new()
(https://rust-lang.github.io/rust-clippy/master/index.html#/string::ne?groups=pedantic)src/distrobox_handler.rs
var.iter()
with&var
when possible (https://rust-lang.github.io/rust-clippy/master/index.html#/explicit_iter_loop?groups=pedantic)String::from("")
withString::new()
(see above)Also :
make update-translations
)