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/main.rs | |
parent | 5d8525a9cc8a61e8e66a92f66132ad11ce112ff7 (diff) |
move hostname and username out of Context and into a static global
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 4c96326..0fce913 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,6 +47,9 @@ lazy_static! { static ref MIMETYPE_T: JoshutoMimetype = JoshutoMimetype::get_config(); static ref PREVIEW_T: JoshutoPreview = JoshutoPreview::get_config(); static ref HOME_DIR: Option<PathBuf> = dirs::home_dir(); + + static ref USERNAME: String = whoami::username(); + static ref HOSTNAME: String = whoami::hostname(); } #[derive(StructOpt, Debug)] |