Skip to content

Commit 59d93c5

Browse files
committed
Fix if_chain
1 parent b950f58 commit 59d93c5

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

clippy_lints/src/undocumented_unsafe_blocks.rs

+8-9
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,14 @@ enum ErrorKind {
5656

5757
impl LateLintPass<'_> for UndocumentedUnsafeBlocks {
5858
fn check_block(&mut self, cx: &LateContext<'_>, block: &'_ Block<'_>) {
59-
if self.local_level == 0 {
60-
if_chain! {
61-
if !is_lint_allowed(cx, UNDOCUMENTED_UNSAFE_BLOCKS, block.hir_id);
62-
if !in_external_macro(cx.tcx.sess, block.span);
63-
if let BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) = block.rules;
64-
if let Some(enclosing_scope_hir_id) = cx.tcx.hir().get_enclosing_scope(block.hir_id);
65-
then {
66-
find_candidate(cx, block.span, enclosing_scope_hir_id)
67-
}
59+
if_chain! {
60+
if self.local_level == 0;
61+
if !is_lint_allowed(cx, UNDOCUMENTED_UNSAFE_BLOCKS, block.hir_id);
62+
if !in_external_macro(cx.tcx.sess, block.span);
63+
if let BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) = block.rules;
64+
if let Some(enclosing_scope_hir_id) = cx.tcx.hir().get_enclosing_scope(block.hir_id);
65+
then {
66+
find_candidate(cx, block.span, enclosing_scope_hir_id)
6867
}
6968
}
7069
}

0 commit comments

Comments
 (0)