summaryrefslogtreecommitdiff
path: root/src/user.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-03-20 23:34:50 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-03-20 23:34:50 +0200
commita62fa84b0bb5abe3a2c52a047f47b6403ffcd54c (patch)
tree7efd7e60d5d046b1239c91beb3e9d9cc45e9839e /src/user.rs
parent2b827a0ab06fb715290a0450a3fff56d3e6f4ee6 (diff)
Move user info gathering to its own workspace crate
Diffstat (limited to 'src/user.rs')
-rw-r--r--src/user.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/user.rs b/src/user.rs
deleted file mode 100644
index 72aea8d..0000000
--- a/src/user.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-pub fn get_username() -> Option<String> {
- let uid = nix::unistd::getuid();
- nix::unistd::User::from_uid(uid)
- .ok()
- .flatten()
- .map(|user| user.name)
-}