From 8d99d702746585f96ec1941491f8f92f0b4fa381 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Sat, 20 Apr 2024 19:52:01 +0200 Subject: [PATCH] cleanup --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5e5c08a..2e414e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,13 +11,10 @@ use nix::sched::{clone, unshare, CloneFlags}; use nix::sys::prctl::set_pdeathsig; use nix::sys::signal::Signal; use nix::sys::wait::{waitpid, WaitStatus}; -use nix::unistd::{close, getgid, getpid, getuid, Gid, Pid, Uid}; -use once_cell::sync::OnceCell; +use nix::unistd::{close, Gid, Uid}; use std::ffi::OsString; use std::fs::OpenOptions; use std::io::Write; - -use std::path::Path; use std::process::Command; use std::time::SystemTime; use std::{env, fs}; @@ -64,7 +61,10 @@ fn main() -> eyre::Result<()> { let config = Config::build()?; - ensure!(!config.uid.is_root(), "hover-rs is not made to be run as root!"); + ensure!( + !config.uid.is_root(), + "hover-rs is not made to be run as root!" + ); let (argv0, argv) = if args.command.is_empty() { (env::var("SHELL").ok().unwrap_or(String::from("sh")), vec![])