Skip to content

Commit

Permalink
Define generic parameter bound in one place only
Browse files Browse the repository at this point in the history
Flagged by recent Clippy.
  • Loading branch information
samueltardieu committed Mar 29, 2024
1 parent 88b517a commit 4d50bf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ use walkdir::{DirEntry, WalkDir};
use crate::error::{Error, Result};
use crate::report::BenchmarkId;

pub fn load<A, P: ?Sized>(path: &P) -> Result<A>
pub fn load<A, P>(path: &P) -> Result<A>
where
A: DeserializeOwned,
P: AsRef<Path>,
P: AsRef<Path> + ?Sized,
{
let path = path.as_ref();
let mut f = File::open(path).map_err(|inner| Error::AccessError {
Expand Down

0 comments on commit 4d50bf1

Please sign in to comment.