Skip to content

Conversation

fox0
Copy link
Contributor

@fox0 fox0 commented Oct 11, 2024

Also returned assert!(false); in fn write()

Copy link
Contributor

@jgarzik jgarzik left a comment

Choose a reason for hiding this comment

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

OK except for small detail - panic message text

file/split.rs Outdated
match &mut self.outf {
Some(ref mut f) => f.write_all(buf),
None => Ok(()),
None => panic!("lol"),
Copy link
Contributor

Choose a reason for hiding this comment

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

heh, but need to do better.

Put a real error message there.

@jgarzik jgarzik merged commit 45fb86f into rustcoreutils:main Oct 13, 2024
2 checks passed
Some(ref mut f) => f.write_all(buf),
None => panic!("lol"),
// TODO:
None => panic!("unreachable"),
Copy link
Contributor

Choose a reason for hiding this comment

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

fwiw, you can use macro unreachable!()

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