diff --git a/backend.Dockerfile b/backend.Dockerfile index 019effbff71..3b1950312b2 100644 --- a/backend.Dockerfile +++ b/backend.Dockerfile @@ -1,5 +1,5 @@ # renovate: datasource=github-tags depName=rust lookupName=rust-lang/rust -ARG RUST_VERSION=1.83.0 +ARG RUST_VERSION=1.84.0 FROM rust:$RUST_VERSION diff --git a/crates/crates_io_tarball/src/lib.rs b/crates/crates_io_tarball/src/lib.rs index 4d654e202c5..e9df7a9e4bf 100644 --- a/crates/crates_io_tarball/src/lib.rs +++ b/crates/crates_io_tarball/src/lib.rs @@ -111,7 +111,7 @@ pub async fn process_tarball( let mut contents = String::new(); entry.read_to_string(&mut contents).await?; vcs_info = CargoVcsInfo::from_contents(&contents).ok(); - } else if entry_file.to_ascii_lowercase() == "cargo.toml" { + } else if entry_file.eq_ignore_ascii_case("cargo.toml") { // Try to extract and read the Cargo.toml from the tarball, silently erroring if it // cannot be read. let owned_entry_path = entry_path.into_owned(); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 0193dee3606..efd9dc3dbeb 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.83.0" +channel = "1.84.0" diff --git a/src/external_urls.rs b/src/external_urls.rs index 9d1129aef46..7f3f7ed6116 100644 --- a/src/external_urls.rs +++ b/src/external_urls.rs @@ -12,10 +12,7 @@ const DOMAIN_BLOCKLIST: &[&str] = &[ /// Return `None` if the documentation URL host matches a blocked host pub fn remove_blocked_urls(url: Option) -> Option { // Handles if documentation URL is None - let url = match url { - Some(url) => url, - None => return None, - }; + let url = url?; // Handles unsuccessful parsing of documentation URL let parsed_url = match Url::parse(&url) { @@ -24,10 +21,7 @@ pub fn remove_blocked_urls(url: Option) -> Option { }; // Extract host string from documentation URL - let url_host = match parsed_url.host_str() { - Some(url_host) => url_host, - None => return None, - }; + let url_host = parsed_url.host_str()?; // Match documentation URL host against blocked host array elements if domain_is_blocked(url_host) { diff --git a/src/models/krate.rs b/src/models/krate.rs index beaf9c10e20..1e98dd2b78c 100644 --- a/src/models/krate.rs +++ b/src/models/krate.rs @@ -106,7 +106,7 @@ pub struct NewCrate<'a> { pub max_features: Option, } -impl<'a> NewCrate<'a> { +impl NewCrate<'_> { pub async fn update(&self, conn: &mut AsyncPgConnection) -> QueryResult { use diesel::update; diff --git a/src/models/team.rs b/src/models/team.rs index 6c0b925aa20..d654f6ccc38 100644 --- a/src/models/team.rs +++ b/src/models/team.rs @@ -43,7 +43,7 @@ pub struct NewTeam<'a> { pub org_id: i32, } -impl<'a> NewTeam<'a> { +impl NewTeam<'_> { pub async fn create_or_update(&self, conn: &mut AsyncPgConnection) -> QueryResult { use diesel::insert_into;