diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-29 23:06:38 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-29 23:07:27 -0400 |
commit | 5980d762dba38b003dbe54506cdd58ee85f97c8c (patch) | |
tree | 28e07e112586b73e1de426f7ae34c8c2afc68fdb /src/context.rs | |
parent | 5d8525a9cc8a61e8e66a92f66132ad11ce112ff7 (diff) |
move hostname and username out of Context and into a static global
Diffstat (limited to 'src/context.rs')
-rw-r--r-- | src/context.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/context.rs b/src/context.rs index d121277..89ec586 100644 --- a/src/context.rs +++ b/src/context.rs @@ -3,8 +3,6 @@ use crate::config; use crate::tab::JoshutoTab; pub struct JoshutoContext { - pub username: String, - pub hostname: String, pub threads: Vec<FileOperationThread>, pub curr_tab_index: usize, pub tabs: Vec<JoshutoTab>, @@ -15,12 +13,7 @@ pub struct JoshutoContext { impl JoshutoContext { pub fn new(config_t: config::JoshutoConfig) -> Self { - let username: String = whoami::username(); - let hostname: String = whoami::hostname(); - JoshutoContext { - username, - hostname, threads: Vec::new(), curr_tab_index: 0, tabs: Vec::new(), |