diff options
| author | Conrad Ludgate <conradludgate@gmail.com> | 2021-02-14 18:00:41 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-14 18:00:41 +0000 |
| commit | bae59474eef3fd28758a2a4e5e4fb8d50c93a3c4 (patch) | |
| tree | d0c85ade3768dc9b04f6d94c9d9b5c360a17c257 /src/local/history.rs | |
| parent | tidy some stuff (#6) (diff) | |
| download | atuin-bae59474eef3fd28758a2a4e5e4fb8d50c93a3c4.zip | |
a few more tiny touch ups (#7)
* a few more tiny touch ups
* all praise clippy
Diffstat (limited to 'src/local/history.rs')
| -rw-r--r-- | src/local/history.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/local/history.rs b/src/local/history.rs index 06a350fc..d88353f9 100644 --- a/src/local/history.rs +++ b/src/local/history.rs @@ -24,9 +24,9 @@ impl History { session: Option<String>, hostname: Option<String>, ) -> Self { - let session = session.unwrap_or_else(|| { - env::var("ATUIN_SESSION").unwrap_or_else(|_| Uuid::new_v4().to_simple().to_string()) - }); + let session = session + .or_else(|| env::var("ATUIN_SESSION").ok()) + .unwrap_or_else(|| Uuid::new_v4().to_simple().to_string()); let hostname = hostname.unwrap_or_else(|| hostname::get().unwrap().to_str().unwrap().to_string()); |
