Skip to content

Commit

Permalink
cargo clippy fixes after upgradeing rustc
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed May 3, 2024
1 parent 8431886 commit 7488d9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,5 @@ cast_lossless = "allow"
default_numeric_fallback = "allow"
expect_used = "allow"
unnecessary_wraps = "allow"

std_instead_of_core = "allow"
6 changes: 3 additions & 3 deletions src/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ fn add_owners_to_crates(crates: &mut [Crate], users: &Vec<User>, owner_by_crate_
//println!("owner_id: {owner_id}");
match mapping.get(owner_id) {
Some(val) => {
krate.owner_gh_login = val.gh_login.clone();
krate.owner_name = val.name.clone();
krate.owner_gh_avatar = val.gh_avatar.clone();
krate.owner_gh_login.clone_from(&val.gh_login);
krate.owner_name.clone_from(&val.name);
krate.owner_gh_avatar.clone_from(&val.gh_avatar);
}
None => {
log::warn!("crate {crate_id} owner_id {owner_id} does not have a user");
Expand Down
1 change: 1 addition & 0 deletions src/vcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ fn read_rustfmt(rustfmt: &mut Vec<String>, filename: &str, name: &str) {
//log::debug!("key: {:30} value: {}", row.0, row.1);
let mut value = row.1.to_string();
#[allow(clippy::string_slice)]
#[allow(clippy::assigning_clones)]
if value.starts_with('"') && value.ends_with('"') {
value = value[1..value.len() - 1].to_owned();
}
Expand Down

0 comments on commit 7488d9b

Please sign in to comment.