From 5be4a5f472655a76e1430bad09a19f6ad111e474 Mon Sep 17 00:00:00 2001 From: Jiayi Zhao Date: Sat, 29 Aug 2020 22:06:19 -0400 Subject: big rework and dependency update - abstract JoshutoContext implementation behind functions - rework io workers in an attempt to fix a bug - update dependencies - remove JoshutoContextWorker --- src/config/mimetype.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/config') diff --git a/src/config/mimetype.rs b/src/config/mimetype.rs index 9b82f08..a5a28c2 100644 --- a/src/config/mimetype.rs +++ b/src/config/mimetype.rs @@ -32,11 +32,13 @@ impl JoshutoMimetypeEntry { } } + #[allow(dead_code)] pub fn arg>(&mut self, arg: S) -> &mut Self { self._args.push(arg.into()); self } + #[allow(dead_code)] pub fn args(&mut self, args: I) -> &mut Self where I: Iterator, @@ -46,41 +48,50 @@ impl JoshutoMimetypeEntry { self } + #[allow(dead_code)] pub fn fork(&mut self, fork: bool) -> &mut Self { self._fork = fork; self } + #[allow(dead_code)] pub fn silent(&mut self, silent: bool) -> &mut Self { self._silent = silent; self } + #[allow(dead_code)] pub fn confirm_exit(&mut self, confirm_exit: bool) -> &mut Self { self._confirm_exit = confirm_exit; self } + #[allow(dead_code)] pub fn get_command(&self) -> &str { self._command.as_str() } + #[allow(dead_code)] pub fn get_args(&self) -> &[String] { &self._args } + #[allow(dead_code)] pub fn get_fork(&self) -> bool { self._fork } + #[allow(dead_code)] pub fn get_silent(&self) -> bool { self._silent } + #[allow(dead_code)] pub fn get_confirm_exit(&self) -> bool { self._confirm_exit } + #[allow(dead_code)] pub fn execute_with(&self, paths: I) -> std::io::Result<()> where I: IntoIterator, -- cgit v1.2.3