mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust: Automatically generated Clippy fixes for the tools only
Clippy settings: [workspace.lints.clippy] cognitive_complexity = "warn" dbg_macro = "warn" debug_assert_with_mut_call = "warn" doc_link_with_quotes = "warn" doc_markdown = "warn" empty_line_after_outer_attr = "warn" empty_structs_with_brackets = "warn" float_cmp = "warn" float_cmp_const = "warn" float_equality_without_abs = "warn" missing_const_for_fn = "warn" missing_errors_doc = "warn" mod_module_files = "warn" option_if_let_else = "warn" similar_names = "warn" suspicious_operation_groupings = "warn" unused_self = "warn" use_debug = "warn" used_underscore_binding = "warn" useless_let_if_seq = "warn" wildcard_dependencies = "warn" wildcard_imports = "warn" Command used: $ cargo +nightly clippy --fix Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
3d83100fa3
commit
b1ca60f5ba
@@ -578,10 +578,7 @@ pub fn set_apqn_bind_state(card: u32, dom: u32, state: BindState) -> Result<(),
|
||||
card, dom
|
||||
));
|
||||
}
|
||||
let newstate = match get_apqn_bind_state(card, dom) {
|
||||
Err(err) => return Err(err),
|
||||
Ok(s) => s,
|
||||
};
|
||||
let newstate = get_apqn_bind_state(card, dom)?;
|
||||
if newstate == state {
|
||||
return Ok(());
|
||||
}
|
||||
@@ -653,10 +650,7 @@ fn set_apqn_associate_state_associate(card: u32, dom: u32, idx: u16) -> Result<(
|
||||
card, dom, idx
|
||||
));
|
||||
}
|
||||
let newstate = match get_apqn_associate_state(card, dom) {
|
||||
Err(err) => return Err(err),
|
||||
Ok(s) => s,
|
||||
};
|
||||
let newstate = get_apqn_associate_state(card, dom)?;
|
||||
if let AssocState::Associated(i) = newstate {
|
||||
if idx == i {
|
||||
return Ok(());
|
||||
@@ -694,10 +688,7 @@ fn set_apqn_associate_state_unbind(card: u32, dom: u32) -> Result<(), String> {
|
||||
card, dom
|
||||
));
|
||||
}
|
||||
let newstate = match get_apqn_associate_state(card, dom) {
|
||||
Err(err) => return Err(err),
|
||||
Ok(s) => s,
|
||||
};
|
||||
let newstate = get_apqn_associate_state(card, dom)?;
|
||||
if newstate == AssocState::Unassociated {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user