Skip to content

Commit

Permalink
systemd: Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
mbuesch committed Dec 18, 2024
1 parent 0a57e65 commit d8d2f4c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions letmein-systemd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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<Vec<SystemdSocket>> {
let mut sockets = vec![];
if sd_notify::booted().unwrap_or(false) {
Expand Down Expand Up @@ -168,6 +166,7 @@ impl SystemdSocket {
continue;
}

let _ = fd;
return Err(err!("Received unknown socket from systemd"));
}
}
Expand Down

0 comments on commit d8d2f4c

Please sign in to comment.