diff --git a/src/fs/explorer/mod.rs b/src/fs/explorer/mod.rs index 2d1a3e0..e9095cf 100644 --- a/src/fs/explorer/mod.rs +++ b/src/fs/explorer/mod.rs @@ -137,7 +137,7 @@ impl FileExplorer { /// /// Iterate over files /// Filters are applied based on current options (e.g. hidden files not returned) - pub fn iter_files(&self) -> Box + '_> { + pub fn iter_files(&self) -> impl Iterator + '_ { // Filter let opts: ExplorerOpts = self.opts; Box::new(self.files.iter().filter(move |x| { @@ -154,7 +154,7 @@ impl FileExplorer { /// ### iter_files_all /// /// Iterate all files; doesn't care about options - pub fn iter_files_all(&self) -> Box + '_> { + pub fn iter_files_all(&self) -> impl Iterator + '_ { Box::new(self.files.iter()) } diff --git a/src/system/bookmarks_client.rs b/src/system/bookmarks_client.rs index 7d98028..e071dbc 100644 --- a/src/system/bookmarks_client.rs +++ b/src/system/bookmarks_client.rs @@ -96,7 +96,7 @@ impl BookmarksClient { /// ### iter_bookmarks /// /// Iterate over bookmarks keys - pub fn iter_bookmarks(&self) -> Box + '_> { + pub fn iter_bookmarks(&self) -> impl Iterator + '_ { Box::new(self.hosts.bookmarks.keys()) } @@ -156,7 +156,7 @@ impl BookmarksClient { /// ### iter_recents /// /// Iterate over recents keys - pub fn iter_recents(&self) -> Box + '_> { + pub fn iter_recents(&self) -> impl Iterator + '_ { Box::new(self.hosts.recents.keys()) } diff --git a/src/system/config_client.rs b/src/system/config_client.rs index 9463269..16d034a 100644 --- a/src/system/config_client.rs +++ b/src/system/config_client.rs @@ -242,7 +242,7 @@ impl ConfigClient { /// ### iter_ssh_keys /// /// Get an iterator through hosts in the ssh key storage - pub fn iter_ssh_keys(&self) -> Box + '_> { + pub fn iter_ssh_keys(&self) -> impl Iterator + '_ { Box::new(self.config.remote.ssh_keys.keys()) }