From 8b0dbb2314d2ab3cd9081163899ea4e52a193e4d Mon Sep 17 00:00:00 2001 From: qwjyh Date: Sun, 1 Dec 2024 19:19:28 +0900 Subject: [PATCH] fix: add lifetime annotation (clippy) --- src/backups.rs | 2 +- src/storages/directory.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backups.rs b/src/backups.rs index 2816a6a..8f70509 100644 --- a/src/backups.rs +++ b/src/backups.rs @@ -180,7 +180,7 @@ impl Backup { &self.name } - pub fn device<'a>(&'a self, devices: &'a [Device]) -> Option<&Device> { + pub fn device<'a>(&'a self, devices: &'a [Device]) -> Option<&'a Device> { devices.iter().find(|dev| dev.name() == self.device) } diff --git a/src/storages/directory.rs b/src/storages/directory.rs index 1777ec3..1642518 100644 --- a/src/storages/directory.rs +++ b/src/storages/directory.rs @@ -127,7 +127,7 @@ impl StorageExt for Directory { } // Get parent `&Storage` of directory. - fn parent<'a>(&'a self, storages: &'a Storages) -> Option<&Storage> { + fn parent<'a>(&'a self, storages: &'a Storages) -> Option<&'a Storage> { storages.get(&self.parent) } }