Skip to content

tee: reduce line of code#11892

Open
oech3 wants to merge 1 commit intouutils:mainfrom
oech3:tee-code
Open

tee: reduce line of code#11892
oech3 wants to merge 1 commit intouutils:mainfrom
oech3:tee-code

Conversation

@oech3
Copy link
Copy Markdown
Contributor

@oech3 oech3 commented Apr 18, 2026

I'm trying to simplify tee by some reason. But it is not too easy...

Comment thread src/uu/tee/src/tee.rs
let mut aborted = None;
let mode = self.output_error_mode.clone();
let mut errors = 0;
self.writers.retain_mut(|writer| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks quite ugly, could we use a match instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to remove retain_mut?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a closer look, and found more refactoring: #11893

@oech3 oech3 force-pushed the tee-code branch 2 times, most recently from 2e148fb to bebdf14 Compare April 18, 2026 18:30
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 18, 2026

Unable to generate the performance report

There was an internal error while processing the run's data. We're working on fixing the issue. Feel free to contact us on Discord or at support@codspeed.io if the issue persists.

@oech3 oech3 marked this pull request as ready for review April 18, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants