chore: Fix clippy lints
This commit is contained in:
parent
a19cfa061b
commit
2c525854c9
3 changed files with 9 additions and 13 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue