1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 20:47:46 +00:00

Formatting

This commit is contained in:
Alex Lyon 2020-06-16 04:06:01 -05:00 committed by Roy Ivy III
parent e8dcca1872
commit 46e2c14f07
2 changed files with 8 additions and 4 deletions

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> {

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
)
};
}