Merge pull request #13 from Arcterus/canary

Formatting
This commit is contained in:
Sylvestre Ledru
2020-06-16 11:19:46 +02:00
committed by GitHub
2 changed files with 8 additions and 4 deletions
+3 -3
View File
@@ -74,12 +74,12 @@ use std::ffi::OsString;
pub trait Args: Iterator<Item = OsString> + Sized {
fn collect_str(self) -> Vec<String> {
// FIXME: avoid unwrap()
self.map(|s| s.into_string().unwrap()).collect()
// FIXME: avoid unwrap()
self.map(|s| s.into_string().unwrap()).collect()
}
}
impl<T: Iterator<Item = OsString> + Sized> Args for T { }
impl<T: Iterator<Item = OsString> + Sized> Args for T {}
// args() ...
pub fn args() -> impl Iterator<Item = String> {
+5 -1
View File
@@ -180,7 +180,11 @@ macro_rules! msg_opt_only_usable_if {
msg_invalid_opt_use!(format!("only usable if {}", $clause), $flag)
};
($clause:expr, $long_flag:expr, $short_flag:expr) => {
msg_invalid_opt_use!(format!("only usable if {}", $clause), $long_flag, $short_flag)
msg_invalid_opt_use!(
format!("only usable if {}", $clause),
$long_flag,
$short_flag
)
};
}