Add docs to count_repositories

This commit is contained in:
Max Smirnov 2022-08-22 10:51:57 +03:00
parent 4b5d962c2c
commit 7139663544
No known key found for this signature in database
GPG Key ID: 2C3271EA73A3F336

View File

@ -1,6 +1,9 @@
use crate::error::Result;
use std::{fs::{read_dir, ReadDir}, path::Path, result::Result as StdResult, iter::once};
/// The on disk layout for served repos is `<service>/<user>/<repo>`
/// so to get the amount of repos, we just have to count everything
/// in `*/*/*` to get the count.
#[instrument]
pub(crate) fn count_repositories<P>(repo_path: P) -> Result<usize>
where