aboutsummaryrefslogtreecommitdiffstats
path: root/crates/daemon/src/aclient/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crates/daemon/src/aclient/utils.rs (renamed from crates/turtle/src/atuin_client/utils.rs)17
1 files changed, 1 insertions, 16 deletions
diff --git a/crates/turtle/src/atuin_client/utils.rs b/crates/daemon/src/aclient/utils.rs
index 989f9fc1..18e732a0 100644
--- a/crates/turtle/src/atuin_client/utils.rs
+++ b/crates/daemon/src/aclient/utils.rs
@@ -1,18 +1,3 @@
-pub(crate) fn get_hostname() -> String {
- std::env::var("ATUIN_HOST_NAME")
- .unwrap_or_else(|_| whoami::hostname().unwrap_or_else(|_| "unknown-host".to_string()))
-}
-
-pub(crate) fn get_username() -> String {
- std::env::var("ATUIN_HOST_USER")
- .unwrap_or_else(|_| whoami::username().unwrap_or_else(|_| "unknown-user".to_string()))
-}
-
-/// Returns a pair of the hostname and username, separated by a colon.
-pub(crate) fn get_host_user() -> String {
- format!("{}:{}", get_hostname(), get_username())
-}
-
/// Setup a [`SQLite`] database.
///
/// This takes care of correct locking, so that we avoid a race when setting up the database.
@@ -28,7 +13,7 @@ macro_rules! setup_db {
Ok(())
}
- crate::atuin_client::utils::setup_db_inner($db_path, $a_timeout, $opts, migrate)
+ crate::aclient::utils::setup_db_inner($db_path, $a_timeout, $opts, migrate)
}};
}
pub(crate) use setup_db;