about summary refs log tree commit diff
path: root/clippy_dev/src/update_lints.rs
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2025-05-31 14:09:03 +0200
committerPhilipp Krones <hello@philkrones.com>2025-05-31 14:09:03 +0200
commit384b53eee2a479969347bbe3a46c504353cc00a2 (patch)
treef11d7e335b46a53087a622c8360b5b842ef59e20 /clippy_dev/src/update_lints.rs
parent660aede53066ca0ab4354160d982d19b7962739b (diff)
parent2948678647a298047a42c72d7060bf509d74bd1d (diff)
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_dev/src/update_lints.rs')
-rw-r--r--clippy_dev/src/update_lints.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/clippy_dev/src/update_lints.rs b/clippy_dev/src/update_lints.rs
index 25ba2c72049..320462a2c96 100644
--- a/clippy_dev/src/update_lints.rs
+++ b/clippy_dev/src/update_lints.rs
@@ -1,5 +1,5 @@
 use crate::utils::{
-    ErrAction, File, FileUpdater, RustSearcher, Token, UpdateMode, UpdateStatus, panic_action, update_text_region_fn,
+    ErrAction, File, FileUpdater, RustSearcher, Token, UpdateMode, UpdateStatus, expect_action, update_text_region_fn,
 };
 use itertools::Itertools;
 use std::collections::HashSet;
@@ -201,10 +201,7 @@ pub fn find_lint_decls() -> Vec<Lint> {
 /// Reads the source files from the given root directory
 fn read_src_with_module(src_root: &Path) -> impl use<'_> + Iterator<Item = (DirEntry, String)> {
     WalkDir::new(src_root).into_iter().filter_map(move |e| {
-        let e = match e {
-            Ok(e) => e,
-            Err(ref e) => panic_action(e, ErrAction::Read, src_root),
-        };
+        let e = expect_action(e, ErrAction::Read, src_root);
         let path = e.path().as_os_str().as_encoded_bytes();
         if let Some(path) = path.strip_suffix(b".rs")
             && let Some(path) = path.get("clippy_lints/src/".len()..)