Skip to content
Merged
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
8 changes: 2 additions & 6 deletions src/uu/tac/src/tac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,11 @@ fn tac(filenames: &[OsString], before: bool, regex: bool, separator: &OsStr) ->

// Select the appropriate `tac` algorithm based on whether the
// separator is given as a regular expression or a fixed string.
let result = match maybe_pattern {
match maybe_pattern {
Some(ref pattern) => buffer_tac_regex(data, pattern, before),
None => buffer_tac(data, before, separator),
};

// If there is any error in writing the output, terminate immediately.
if let Err(e) = result {
return Err(TacError::WriteError(e).into());
}
.map_err(TacError::WriteError)?;
}
Ok(())
}
Expand Down
Loading