From 1ef709ab9726a353bf1e081a986f729679b83748 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Fri, 21 Oct 2022 14:12:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Un=20poco=20de=20orden=20en=20el?= =?UTF-8?q?=20c=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagetop/src/config/file.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pagetop/src/config/file.rs b/pagetop/src/config/file.rs index 8f05bffb..b644d196 100644 --- a/pagetop/src/config/file.rs +++ b/pagetop/src/config/file.rs @@ -16,7 +16,6 @@ where T: FileSource, { source: T, - /// A required File will error if it cannot be found. required: bool, } @@ -26,8 +25,8 @@ impl File { /// registered format. pub fn with_name(name: &str) -> Self { File { - required: true, source: source::FileSourceFile::new(name.into()), + required: true, } } } @@ -35,8 +34,8 @@ impl File { impl<'a> From<&'a Path> for File { fn from(path: &'a Path) -> Self { File { - required: true, source: source::FileSourceFile::new(path.to_path_buf()), + required: true, } } } @@ -44,8 +43,8 @@ impl<'a> From<&'a Path> for File { impl From for File { fn from(path: PathBuf) -> Self { File { - required: true, source: source::FileSourceFile::new(path), + required: true, } } }