Skip to content

Commit

Permalink
fix new clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Dec 29, 2023
1 parent 7ef5327 commit 63c35f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/docbuilder/rustwide_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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"));
Expand Down
4 changes: 2 additions & 2 deletions src/utils/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -61,7 +61,7 @@ pub fn remove_crate_priority(conn: &mut Client, pattern: &str) -> Result<Option<
&[&pattern],
)?;

Ok(query.get(0).map(|row| row.get(0)))
Ok(query.first().map(|row| row.get(0)))
}

#[cfg(test)]
Expand Down

0 comments on commit 63c35f2

Please sign in to comment.