Skip to content

Commit

Permalink
fix clipp warnning
Browse files Browse the repository at this point in the history
  • Loading branch information
DaviRain-Su committed Jun 4, 2024
1 parent a0bbd6f commit eacb166
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![allow(clippy::borrowed_box)]
#![allow(clippy::only_used_in_recursion)]

//! # Introduction to algorithms
//! > thrid edition implement by rust programming
//!
Expand Down
2 changes: 1 addition & 1 deletion rust/src/sort/select_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<T> SelectSort<T> {
where
F: FnOnce(Option<&T>, Option<&T>) -> bool + Copy,
{
let mut smallest = self.arr.get(0);
let mut smallest = self.arr.first();
let mut smallest_index = 0usize;
for i in 1..self.arr.len() {
if f(self.arr.get(i), smallest) {
Expand Down

0 comments on commit eacb166

Please sign in to comment.