diff options
author | Conrad Ludgate <conradludgate@gmail.com> | 2023-09-26 14:52:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 14:52:45 +0100 |
commit | fc1a48a4f204dfe77bd8d4f82cfb3e64ade9d028 (patch) | |
tree | 72239a49993bfb023c8979c5ff4821ca3878b708 /atuin-client/src/secrets.rs | |
parent | bdba88c11f21cef8185e6eebf34be2343d748799 (diff) |
handle missing entries (fixes #1236) (#1253)
* fix #1236
* lints
Diffstat (limited to 'atuin-client/src/secrets.rs')
-rw-r--r-- | atuin-client/src/secrets.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/atuin-client/src/secrets.rs b/atuin-client/src/secrets.rs index ba6aee663..0f751a8a7 100644 --- a/atuin-client/src/secrets.rs +++ b/atuin-client/src/secrets.rs @@ -46,7 +46,7 @@ mod tests { fn test_secrets() { for (name, regex, test) in SECRET_PATTERNS { let re = - Regex::new(regex).expect(format!("Failed to compile regex for {name}").as_str()); + Regex::new(regex).unwrap_or_else(|_| panic!("Failed to compile regex for {name}")); assert!(re.is_match(test), "{name} test failed!"); } |