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/history.rs | |
| parent | better sync error messages (#1254) (diff) | |
| download | atuin-fc1a48a4f204dfe77bd8d4f82cfb3e64ade9d028.zip | |
handle missing entries (fixes #1236) (#1253)
* fix #1236
* lints
Diffstat (limited to 'atuin-client/src/history.rs')
| -rw-r--r-- | atuin-client/src/history.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/atuin-client/src/history.rs b/atuin-client/src/history.rs index f4c0a8eb..fbcb169c 100644 --- a/atuin-client/src/history.rs +++ b/atuin-client/src/history.rs @@ -210,9 +210,11 @@ mod tests { // Test that we don't save history where necessary #[test] fn privacy_test() { - let mut settings = Settings::default(); - settings.cwd_filter = RegexSet::new(["^/supasecret"]).unwrap(); - settings.history_filter = RegexSet::new(["^psql"]).unwrap(); + let settings = Settings { + cwd_filter: RegexSet::new(["^/supasecret"]).unwrap(), + history_filter: RegexSet::new(["^psql"]).unwrap(), + ..Settings::default() + }; let normal_command: History = History::capture() .timestamp(time::OffsetDateTime::now_utc()) @@ -258,8 +260,10 @@ mod tests { #[test] fn disable_secrets() { - let mut settings = Settings::default(); - settings.secrets_filter = false; + let settings = Settings { + secrets_filter: false, + ..Settings::default() + }; let stripe_key: History = History::capture() .timestamp(time::OffsetDateTime::now_utc()) |
