chore: Fix clippy lints

This commit is contained in:
Gerald Pinder 2025-08-07 15:13:32 -04:00
parent a19cfa061b
commit 2c525854c9
No known key found for this signature in database
3 changed files with 9 additions and 13 deletions

View file

@ -439,9 +439,8 @@ where
// Split the reference by colon to separate the tag or digest
let mut parts = text.split(':');
let path = match parts.next() {
None => return text.to_string(),
Some(path) => path,
let Some(path) = parts.next() else {
return text.to_string();
};
let tag = parts.next();

View file

@ -123,7 +123,7 @@ impl BugReportCommand {
Ok(())
}
fn get_recipe(&self) -> Option<Recipe> {
fn get_recipe(&self) -> Option<Recipe<'_>> {
let recipe_path = self.recipe_path.clone().unwrap_or_else(|| {
get_config_file("recipe", "Enter path to recipe file").unwrap_or_else(|_| {
trace!("Failed to get recipe");

View file

@ -88,15 +88,12 @@ where
let mut stream_start = false;
let mut document_start = false;
let key = match self.path.next() {
None => {
let (_, marker) = self
.events
.find(|(e, _)| matches!(e, Event::StreamStart))
.unwrap();
return Ok((marker.index(), 1).into());
}
Some(key) => key,
let Some(key) = self.path.next() else {
let (_, marker) = self
.events
.find(|(e, _)| matches!(e, Event::StreamStart))
.unwrap();
return Ok((marker.index(), 1).into());
};
Ok(loop {