Use tracing instead of slog for better ergonomics
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Valentin Brandl
2020-10-30 16:40:35 +01:00
parent 2d46592c4a
commit 6f931ce46f
6 changed files with 302 additions and 121 deletions

View File

@ -1,10 +1,12 @@
use crate::error::Result;
use std::{fs::read_dir, path::Path, result::Result as StdResult};
#[instrument]
pub(crate) fn count_repositories<P>(repo_path: P) -> Result<usize>
where
P: AsRef<Path>,
P: AsRef<Path> + std::fmt::Debug,
{
trace!("Counting repositories");
std::fs::create_dir_all(&repo_path)?;
Ok(read_dir(repo_path)?
.filter_map(StdResult::ok)