Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend.Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion crates/crates_io_tarball/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub async fn process_tarball<R: tokio::io::AsyncRead + Unpin>(
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();
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.83.0"
channel = "1.84.0"
10 changes: 2 additions & 8 deletions src/external_urls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) -> Option<String> {
// 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) {
Expand All @@ -24,10 +21,7 @@ pub fn remove_blocked_urls(url: Option<String>) -> Option<String> {
};

// 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) {
Expand Down
2 changes: 1 addition & 1 deletion src/models/krate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub struct NewCrate<'a> {
pub max_features: Option<i16>,
}

impl<'a> NewCrate<'a> {
impl NewCrate<'_> {
pub async fn update(&self, conn: &mut AsyncPgConnection) -> QueryResult<Crate> {
use diesel::update;

Expand Down
2 changes: 1 addition & 1 deletion src/models/team.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Team> {
use diesel::insert_into;

Expand Down
Loading