diff options
author | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-21 01:13:01 +0530 |
---|---|---|
committer | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-22 22:19:50 +0530 |
commit | 61aa1045764db63734532486cab0500e5828daad (patch) | |
tree | dfebca9004a61d2e3bd2d4852a9dd6dc568875a3 /src | |
parent | 2487256664d4142ee1906f0058cf7e8063cb6e10 (diff) |
Add ability to detach a session
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 2 | ||||
-rw-r--r-- | src/tests/fakes.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index e4651fd1f..82fc14d5e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,7 +58,7 @@ fn list_sessions() { match fs::read_dir(&*ZELLIJ_SOCK_DIR) { Ok(files) => { let mut is_empty = true; - let session_name = std::env::var("ZELLIJ_SESSION_NAME").unwrap_or("".into()); + let session_name = std::env::var("ZELLIJ_SESSION_NAME").unwrap_or_else(|_| "".into()); files.for_each(|file| { let file = file.unwrap(); if file.file_type().unwrap().is_socket() { diff --git a/src/tests/fakes.rs b/src/tests/fakes.rs index e9042ed73..c81e226ff 100644 --- a/src/tests/fakes.rs +++ b/src/tests/fakes.rs @@ -299,6 +299,7 @@ impl ServerOsApi for FakeInputOutput { self.send_instructions_to_client.send(msg).unwrap(); } fn add_client_sender(&self) {} + fn remove_client_sender(&self) {} fn update_receiver(&mut self, _stream: LocalSocketStream) {} fn load_palette(&self) -> Palette { default_palette() |