chore: Fix clippy warnings
This commit is contained in:
parent
82d5a9ecd1
commit
3378cb641a
4 changed files with 9 additions and 9 deletions
|
|
@ -114,15 +114,15 @@ fn get_services_to_reload(services: Services, old_services: Services) -> Service
|
||||||
|
|
||||||
fn systemd_system_dir(ephemeral: bool) -> PathBuf {
|
fn systemd_system_dir(ephemeral: bool) -> PathBuf {
|
||||||
if ephemeral {
|
if ephemeral {
|
||||||
return Path::new(path::MAIN_SEPARATOR_STR)
|
Path::new(path::MAIN_SEPARATOR_STR)
|
||||||
.join("run")
|
.join("run")
|
||||||
.join("systemd")
|
.join("systemd")
|
||||||
.join("system");
|
.join("system")
|
||||||
} else {
|
} else {
|
||||||
return Path::new(path::MAIN_SEPARATOR_STR)
|
Path::new(path::MAIN_SEPARATOR_STR)
|
||||||
.join("etc")
|
.join("etc")
|
||||||
.join("systemd")
|
.join("systemd")
|
||||||
.join("system");
|
.join("system")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ impl AsRef<StorePath> for StorePath {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> From<StorePath> for Cow<'a, StorePath> {
|
impl From<StorePath> for Cow<'_, StorePath> {
|
||||||
fn from(value: StorePath) -> Self {
|
fn from(value: StorePath) -> Self {
|
||||||
Cow::Owned(value)
|
Cow::Owned(value)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -668,8 +668,8 @@ impl dbus::message::SignalArgs for OrgFreedesktopSystemd1ManagerReloading {
|
||||||
const INTERFACE: &'static str = "org.freedesktop.systemd1.Manager";
|
const INTERFACE: &'static str = "org.freedesktop.systemd1.Manager";
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref<Target = T>>
|
impl<T: blocking::BlockingSender, C: ::std::ops::Deref<Target = T>> OrgFreedesktopSystemd1Manager
|
||||||
OrgFreedesktopSystemd1Manager for blocking::Proxy<'a, C>
|
for blocking::Proxy<'_, C>
|
||||||
{
|
{
|
||||||
fn get_unit(&self, name: &str) -> Result<dbus::Path<'static>, dbus::Error> {
|
fn get_unit(&self, name: &str) -> Result<dbus::Path<'static>, dbus::Error> {
|
||||||
self.method_call("org.freedesktop.systemd1.Manager", "GetUnit", (name,))
|
self.method_call("org.freedesktop.systemd1.Manager", "GetUnit", (name,))
|
||||||
|
|
|
||||||
|
|
@ -146,8 +146,8 @@ pub trait OrgFreedesktopSystemd1Unit {
|
||||||
fn activation_details(&self) -> Result<Vec<(String, String)>, dbus::Error>;
|
fn activation_details(&self) -> Result<Vec<(String, String)>, dbus::Error>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref<Target = T>> OrgFreedesktopSystemd1Unit
|
impl<T: blocking::BlockingSender, C: ::std::ops::Deref<Target = T>> OrgFreedesktopSystemd1Unit
|
||||||
for blocking::Proxy<'a, C>
|
for blocking::Proxy<'_, C>
|
||||||
{
|
{
|
||||||
fn start(&self, mode: &str) -> Result<dbus::Path<'static>, dbus::Error> {
|
fn start(&self, mode: &str) -> Result<dbus::Path<'static>, dbus::Error> {
|
||||||
self.method_call("org.freedesktop.systemd1.Unit", "Start", (mode,))
|
self.method_call("org.freedesktop.systemd1.Unit", "Start", (mode,))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue