Skip to content

Commit

Permalink
tee: use retain_mut from std instead of the deprecated retain_mut crate
Browse files Browse the repository at this point in the history
  • Loading branch information
tertsdiepraam committed Feb 11, 2023
1 parent ae27c82 commit bf8e933
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ rand_core = "0.6"
rayon = "1.5"
redox_syscall = "0.2"
regex = "1.7.1"
retain_mut = "0.1.7"
rust-ini = "0.18.0"
same-file = "1.0.6"
selinux = "0.3"
Expand Down
1 change: 0 additions & 1 deletion src/uu/tee/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ path = "src/tee.rs"
[dependencies]
clap = { workspace=true }
libc = { workspace=true }
retain_mut = { workspace=true }
uucore = { workspace=true, features=["libc"] }

[[bin]]
Expand Down
5 changes: 2 additions & 3 deletions src/uu/tee/src/tee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// * file that was distributed with this source code.

use clap::{builder::PossibleValue, crate_version, Arg, ArgAction, Command};
use retain_mut::RetainMut;
use std::fs::OpenOptions;
use std::io::{copy, sink, stdin, stdout, Error, ErrorKind, Read, Result, Write};
use std::path::PathBuf;
Expand Down Expand Up @@ -301,7 +300,7 @@ impl Write for MultiWriter {
let mut aborted = None;
let mode = self.output_error_mode.clone();
let mut errors = 0;
RetainMut::retain_mut(&mut self.writers, |writer| {
self.writers.retain_mut(|writer| {
let result = writer.write_all(buf);
match result {
Err(f) => {
Expand Down Expand Up @@ -332,7 +331,7 @@ impl Write for MultiWriter {
let mut aborted = None;
let mode = self.output_error_mode.clone();
let mut errors = 0;
RetainMut::retain_mut(&mut self.writers, |writer| {
self.writers.retain_mut(|writer| {
let result = writer.flush();
match result {
Err(f) => {
Expand Down

0 comments on commit bf8e933

Please sign in to comment.