satisfy clippy

This commit is contained in:
PgBiel 2024-06-20 23:37:22 -03:00
parent c3c3ea9bfa
commit b318b0ae99
4 changed files with 6 additions and 7 deletions

View File

@ -844,7 +844,7 @@ impl<'a> LinkedNode<'a> {
// Found a parbreak or something else with two or more newlines.
// Can't have an attached decorator there.
return None;
None
}
/// Get the next non-trivia sibling node.

View File

@ -289,7 +289,7 @@ impl Identifier {
pub fn name(&self) -> &str {
match self {
Self::Warn(warning_identifier) => warning_identifier.name(),
Self::User(user_identifier) => &user_identifier,
Self::User(user_identifier) => user_identifier,
Self::Error(_) => unreachable!(),
}
}

View File

@ -246,9 +246,9 @@ impl Sink {
return true;
};
let should_raise = !check_warning_suppressed(diag.span, world, &identifier)
let should_raise = !check_warning_suppressed(diag.span, world, identifier)
&& !diag.trace.iter().any(|tracepoint| {
check_warning_suppressed(tracepoint.span, world, &identifier)
check_warning_suppressed(tracepoint.span, world, identifier)
});
// If this warning wasn't suppressed, any further duplicates (with

View File

@ -168,9 +168,8 @@ impl Eval for ast::FuncCall<'_> {
// Add this function call as a tracepoint to the returned
// diagnostics. This allows visualizing which calls led to them,
// but also allows suppressing warnings at each tracepoint.
vm.engine.tracepoint(point, span, |mut engine| {
func.call(&mut engine, vm.context, args)
})
vm.engine
.tracepoint(point, span, |engine| func.call(engine, vm.context, args))
};
// Stacker is broken on WASM.