From 4d50bf1dd9144510cef51bc2f6fa0cc1195f1251 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 29 Mar 2024 07:17:06 +0100 Subject: [PATCH] Define generic parameter bound in one place only Flagged by recent Clippy. --- src/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fs.rs b/src/fs.rs index f47508be7..dcf263583 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -9,10 +9,10 @@ use walkdir::{DirEntry, WalkDir}; use crate::error::{Error, Result}; use crate::report::BenchmarkId; -pub fn load(path: &P) -> Result +pub fn load(path: &P) -> Result where A: DeserializeOwned, - P: AsRef, + P: AsRef + ?Sized, { let path = path.as_ref(); let mut f = File::open(path).map_err(|inner| Error::AccessError {