Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #208 (Remove pipe for BufferWriter and implement handeling in Writer) #211

Closed
wants to merge 3 commits into from

Conversation

TilCreator
Copy link
Contributor

Fixes #208

A test would also be nice, so that it hopefully doesn't break again unnoticed. ^^

@mainrs
Copy link
Contributor

mainrs commented Jul 13, 2021

I'll write a test today and merge.

@mainrs mainrs self-assigned this Jul 13, 2021
@TilCreator TilCreator mentioned this pull request Jul 19, 2021
@TilCreator
Copy link
Contributor Author

Sry for the force push, but at lest the linter fixes are cleaner now.

WritableTarget::Stdout => print!("{}", String::from_utf8_lossy(&buf.0)),
WritableTarget::Stderr => eprint!("{}", String::from_utf8_lossy(&buf.0)),
WritableTarget::Pipe(_) => unreachable!(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I am missing something quite obvious, but why is this unreachable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BufferWriter::pipe was removed, so there is only BufferWriter::stdout and BufferWriter::stderr left to create a BufferWriter and both of those can't have the Pipe Target.

@jplatte
Copy link
Contributor

jplatte commented Aug 17, 2021

Ping @mainrs.

@TilCreator
Copy link
Contributor Author

Ping @mainrs

@jplatte
Copy link
Contributor

jplatte commented Oct 8, 2021

I don't like the extra unreachable!()s at all. I'm pretty sure I've understood the problem though and will fix it shortly.

@jplatte jplatte closed this Oct 8, 2021
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.

Target::Pipe doesn't work
3 participants