From d8d2f4cdc8dc8920775eed366eada2cdba15e60b Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Wed, 18 Dec 2024 16:46:47 +0100 Subject: [PATCH] systemd: Fix build error --- letmein-systemd/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/letmein-systemd/src/lib.rs b/letmein-systemd/src/lib.rs index ee30382..36f5925 100644 --- a/letmein-systemd/src/lib.rs +++ b/letmein-systemd/src/lib.rs @@ -11,10 +11,7 @@ #[cfg(not(any(target_os = "linux", target_os = "android")))] std::compile_error!("letmeind server and letmein-systemd do not support non-Linux platforms."); -use anyhow as ah; - -#[cfg(any(feature = "tcp", feature = "unix"))] -use anyhow::{format_err as err, Context as _}; +use anyhow::{self as ah, format_err as err, Context as _}; #[cfg(any(feature = "tcp", feature = "unix"))] use std::{ @@ -137,6 +134,7 @@ impl SystemdSocket { /// Get all sockets from systemd. /// /// All environment variables related to this operation will be cleared. + #[allow(unused_mut)] pub fn get_all() -> ah::Result> { let mut sockets = vec![]; if sd_notify::booted().unwrap_or(false) { @@ -168,6 +166,7 @@ impl SystemdSocket { continue; } + let _ = fd; return Err(err!("Received unknown socket from systemd")); } }