From 0a4ec4ecd4db655f4f426f573a202415226660bd Mon Sep 17 00:00:00 2001 From: Max Smirnov Date: Mon, 22 Aug 2022 16:20:24 +0300 Subject: [PATCH] Run fmt --- src/count.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/count.rs b/src/count.rs index f1116dd..232b013 100644 --- a/src/count.rs +++ b/src/count.rs @@ -1,5 +1,10 @@ use crate::error::Result; -use std::{fs::{read_dir, ReadDir}, path::Path, result::Result as StdResult, iter::once}; +use std::{ + fs::{read_dir, ReadDir}, + iter::once, + path::Path, + result::Result as StdResult, +}; /// The on disk layout for served repos is `//` /// so to get the amount of repos, we just have to count everything @@ -15,13 +20,11 @@ where .flat_map(sub_directories) .flat_map(sub_directories) .flat_map(sub_directories) - .count() - ) + .count()) } fn sub_directories(dir: ReadDir) -> impl Iterator { - dir - .filter_map(StdResult::ok) + dir.filter_map(StdResult::ok) .filter(|entry| entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false)) .filter_map(|entry| read_dir(entry.path()).ok()) }