mirror of
https://github.com/typst/typst
synced 2025-05-19 11:35:27 +08:00
satisfy clippy
This commit is contained in:
parent
c3c3ea9bfa
commit
b318b0ae99
@ -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.
|
||||
|
@ -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!(),
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user