From b0f6feadba64502c8aa68dedc3e20be096c5af23 Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Fri, 29 Dec 2023 07:21:42 +0100 Subject: [PATCH] fix new clippy warnings --- src/docbuilder/rustwide_builder.rs | 4 ++-- src/utils/queue.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/docbuilder/rustwide_builder.rs b/src/docbuilder/rustwide_builder.rs index 2c790ffec..6f58d695c 100644 --- a/src/docbuilder/rustwide_builder.rs +++ b/src/docbuilder/rustwide_builder.rs @@ -999,7 +999,7 @@ mod tests { &[&crate_, &version], ) .unwrap(); - let row = rows.get(0).unwrap(); + let row = rows.first().unwrap(); assert!(row.get::<_, bool>("rustdoc_status")); assert_eq!(row.get::<_, String>("default_target"), default_target); @@ -1128,7 +1128,7 @@ mod tests { &[&crate_, &version], ) .unwrap(); - let row = rows.get(0).unwrap(); + let row = rows.first().unwrap(); assert!(!row.get::<_, bool>("rustdoc_status")); assert!(!row.get::<_, bool>("is_library")); diff --git a/src/utils/queue.rs b/src/utils/queue.rs index b5c605aec..b333d6a93 100644 --- a/src/utils/queue.rs +++ b/src/utils/queue.rs @@ -26,7 +26,7 @@ pub fn get_crate_pattern_and_priority( )?; // If no match is found, return the default priority - if let Some(row) = query.get(0) { + if let Some(row) = query.first() { Ok(Some((row.get(0), row.get(1)))) } else { Ok(None) @@ -61,7 +61,7 @@ pub fn remove_crate_priority(conn: &mut Client, pattern: &str) -> Result