From e64f77b71612636a6b53f5360181b10de19e4eaf Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 30 Sep 2021 08:40:55 +0200 Subject: [PATCH] cleanup: move use clause to top --- proxmox-rest-server/src/daemon.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proxmox-rest-server/src/daemon.rs b/proxmox-rest-server/src/daemon.rs index 09140845..9d48ecd2 100644 --- a/proxmox-rest-server/src/daemon.rs +++ b/proxmox-rest-server/src/daemon.rs @@ -11,6 +11,7 @@ use std::path::PathBuf; use anyhow::{bail, format_err, Error}; use futures::future::{self, Either}; +use nix::unistd::{fork, ForkResult}; use proxmox::tools::io::{ReadExt, WriteExt}; use proxmox::tools::fd::Fd; @@ -25,8 +26,8 @@ extern "C" { // Unfortunately FnBox is nightly-only and Box is unusable, so just use Box... type BoxedStoreFunc = Box Result + UnwindSafe + Send>; -/// Helper trait to "store" something in the environment to be re-used after re-executing the -/// service on a reload. +// Helper trait to "store" something in the environment to be re-used after re-executing the +// service on a reload. trait Reloadable: Sized { fn restore(var: &str) -> Result; fn get_store_func(&self) -> Result; @@ -99,7 +100,6 @@ impl Reloader { let (pold, pnew) = super::socketpair()?; // Start ourselves in the background: - use nix::unistd::{fork, ForkResult}; match unsafe { fork() } { Ok(ForkResult::Child) => { // Double fork so systemd can supervise us without nagging...