-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: seq panic on no arguments #4749 #4750
Conversation
please fix the clippy warning and add a test to make sure we don't regress |
affirmative. on it asap, expect it within 24 hours! |
however i have a question, that made clippy fail for me, selinux was not imported correctly for me, but i didn't change any of that code, so what should my next approach be? |
I don't understand. Following the clippy lint made clippy fail because of selinux? Or selinux is making clippy fail in general? In the latter case, turning off the |
@NikolaiSch ping? |
GNU testsuite comparison:
|
I fixed the clippy warnings |
|
I think we can merge this, but in my opinion, the impl Display for SeqError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::ParseError(s, e) => {
let error_type = match e {
ParseNumberError::Float => "floating point",
ParseNumberError::Nan => "'not-a-number'",
ParseNumberError::Hex => "hexadecimal",
};
write!(f, "invalid {} argument: {}", error_type, s.quote())
}
Self::ZeroIncrement(s) => write!(f, "invalid Zero increment value: {}", s.quote()),
Self::NoArguments => write!(f, "missing operand"),
}
}
} and then the |
Co-authored-by: Terts Diepraam <[email protected]>
GNU testsuite comparison:
|
Thanks :) |
This is in reference to issue #4749, where just running
seq
ends up panicking. I have added a newNoArguments
error, and refactored the display formatting, in order to match GNU messages.