From 1f49be1a774b1b778cc819d7b6d50d215297e72a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 3 Jul 2023 08:34:54 -0400 Subject: [PATCH] tor-config: Use next_back() instead of rev().next() This is a new warning^Wsuggestion from clippy nightly. --- crates/tor-config/src/sources.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tor-config/src/sources.rs b/crates/tor-config/src/sources.rs index bb242b46c..2d4f428e8 100644 --- a/crates/tor-config/src/sources.rs +++ b/crates/tor-config/src/sources.rs @@ -368,7 +368,7 @@ impl FoundConfigFiles<'_> { fn is_syntactically_directory(p: &Path) -> bool { use std::path::Component as PC; - match p.components().rev().next() { + match p.components().next_back() { None => false, Some(PC::Prefix(_)) | Some(PC::RootDir) | Some(PC::CurDir) | Some(PC::ParentDir) => true, Some(PC::Normal(_)) => {