Fix ignored clippy lints (#12160)

# Description
Fixes some ignored clippy lints.

# User-Facing Changes
Changes some signatures and return types to `&dyn Command` instead of
`&Box<dyn Command`, but I believe this is only an internal change.
This commit is contained in:
Ian Manske
2024-03-11 18:46:04 +00:00
committed by GitHub
parent 77379d7b3d
commit 26786a759e
20 changed files with 93 additions and 112 deletions

View File

@ -421,7 +421,6 @@ pub struct RequestFlags {
pub full: bool,
}
#[allow(clippy::needless_return)]
fn transform_response_using_content_type(
engine_state: &EngineState,
stack: &mut Stack,
@ -464,9 +463,9 @@ fn transform_response_using_content_type(
let output = response_to_buffer(resp, engine_state, span);
if flags.raw {
return Ok(output);
Ok(output)
} else if let Some(ext) = ext {
return match engine_state.find_decl(format!("from {ext}").as_bytes(), &[]) {
match engine_state.find_decl(format!("from {ext}").as_bytes(), &[]) {
Some(converter_id) => engine_state.get_decl(converter_id).run(
engine_state,
stack,
@ -474,10 +473,10 @@ fn transform_response_using_content_type(
output,
),
None => Ok(output),
};
}
} else {
return Ok(output);
};
Ok(output)
}
}
pub fn check_response_redirection(