Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/uu/env/src/native_int_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl<'a> Convert<&'a Vec<&'a str>, Vec<Cow<'a, NativeIntStr>>> for NCvt {

impl<'a> Convert<Vec<&'a str>, Vec<Cow<'a, NativeIntStr>>> for NCvt {
fn convert(f: Vec<&'a str>) -> Vec<Cow<'a, NativeIntStr>> {
f.iter().map(|x| Self::convert(*x)).collect()
f.into_iter().map(Self::convert).collect()
}
}

Expand Down
14 changes: 6 additions & 8 deletions src/uu/ptx/src/ptx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,14 @@ impl WordFilter {
let break_set: Option<HashSet<char>> = if matches.contains_id(options::BREAK_FILE)
&& !matches.contains_id(options::WORD_REGEXP)
{
let chars =
let mut chars =
read_char_filter_file(matches, options::BREAK_FILE).map_err_context(String::new)?;
let mut hs: HashSet<char> = if config.gnu_ext {
HashSet::new() // really only chars found in file
} else {
if !config.gnu_ext {
// GNU off means at least these are considered
[' ', '\t', '\n'].iter().copied().collect()
};
hs.extend(chars);
Some(hs)
chars.extend([' ', '\t', '\n']);
}
// else only chars found in file
Some(chars)
} else {
// if -W takes precedence or default
None
Expand Down
Loading