tor-config: Use next_back() instead of rev().next()

This is a new warning^Wsuggestion from clippy nightly.
This commit is contained in:
Nick Mathewson 2023-07-03 08:34:54 -04:00
parent 1ae06399d0
commit 1f49be1a77
1 changed files with 1 additions and 1 deletions

View File

@ -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(_)) => {