Skip to content

Commit 9075db0

Browse files
authored
Apply Clippy suggestions (#15549)
While working on other PRs, I noticed that Clippy had some suggestions (warnings). This PR fixes those warnings.
1 parent 427efa2 commit 9075db0

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

crates/oxide/src/cursor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl<'a> Cursor<'a> {
6767
}
6868
}
6969

70-
impl<'a> Display for Cursor<'a> {
70+
impl Display for Cursor<'_> {
7171
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7272
let len = self.input.len().to_string();
7373

crates/oxide/src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl<'a> Extractor<'a> {
204204
}
205205

206206
#[inline(always)]
207-
fn split_candidate(candidate: &'a [u8]) -> SplitCandidate {
207+
fn split_candidate(candidate: &'a [u8]) -> SplitCandidate<'a> {
208208
let mut brackets = 0;
209209
let mut idx_end = 0;
210210

crates/oxide/src/scanner/detect_sources.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,8 @@ impl DetectSources {
9595
)
9696
.into_iter();
9797

98-
loop {
99-
// We are only interested in valid entries
100-
let entry = match it.next() {
101-
Some(Ok(entry)) => entry,
102-
_ => break,
103-
};
104-
98+
// We are only interested in valid entries
99+
while let Some(Ok(entry)) = it.next() {
105100
// Ignore known directories that we don't want to traverse into.
106101
if entry.file_type().is_dir() && entry.file_name() == ".git" {
107102
it.skip_current_dir();

0 commit comments

Comments
 (0)