Skip to content

Commit b0f6fea

Browse files
sypharGuillaumeGomez
authored andcommitted
fix new clippy warnings
1 parent 14f8b62 commit b0f6fea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/docbuilder/rustwide_builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ mod tests {
999999
&[&crate_, &version],
10001000
)
10011001
.unwrap();
1002-
let row = rows.get(0).unwrap();
1002+
let row = rows.first().unwrap();
10031003

10041004
assert!(row.get::<_, bool>("rustdoc_status"));
10051005
assert_eq!(row.get::<_, String>("default_target"), default_target);
@@ -1128,7 +1128,7 @@ mod tests {
11281128
&[&crate_, &version],
11291129
)
11301130
.unwrap();
1131-
let row = rows.get(0).unwrap();
1131+
let row = rows.first().unwrap();
11321132

11331133
assert!(!row.get::<_, bool>("rustdoc_status"));
11341134
assert!(!row.get::<_, bool>("is_library"));

src/utils/queue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn get_crate_pattern_and_priority(
2626
)?;
2727

2828
// If no match is found, return the default priority
29-
if let Some(row) = query.get(0) {
29+
if let Some(row) = query.first() {
3030
Ok(Some((row.get(0), row.get(1))))
3131
} else {
3232
Ok(None)
@@ -61,7 +61,7 @@ pub fn remove_crate_priority(conn: &mut Client, pattern: &str) -> Result<Option<
6161
&[&pattern],
6262
)?;
6363

64-
Ok(query.get(0).map(|row| row.get(0)))
64+
Ok(query.first().map(|row| row.get(0)))
6565
}
6666

6767
#[cfg(test)]

0 commit comments

Comments
 (0)