summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-08-29 22:06:19 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-08-29 22:08:23 -0400
commit5be4a5f472655a76e1430bad09a19f6ad111e474 (patch)
tree1fcffa6c8d37cc6d538b29b6fbd773e8de58512d /src/config
parent4f3842b56f1729dcd8e81c77f98253ed9dfb23b3 (diff)
big rework and dependency update
- abstract JoshutoContext implementation behind functions - rework io workers in an attempt to fix a bug - update dependencies - remove JoshutoContextWorker
Diffstat (limited to 'src/config')
-rw-r--r--src/config/mimetype.rs11
1 files changed, 11 insertions, 0 deletions
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<S: std::convert::Into<String>>(&mut self, arg: S) -> &mut Self {
self._args.push(arg.into());
self
}
+ #[allow(dead_code)]
pub fn args<I, S>(&mut self, args: I) -> &mut Self
where
I: Iterator<Item = S>,
@@ -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<I, S>(&self, paths: I) -> std::io::Result<()>
where
I: IntoIterator<Item = S>,