-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Seq: Add --terminator flag #150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing!! 🎉
I leave some comments for you.
The format check is failing, but don't worry, if you're unable to use nightly compiler to format the code (sadly our config still requires some unstable rustfmt features), after you apply the final changes to solve my comments I'll format the code before merging
seq/src/cli.rs
Outdated
Arg::with_name("TERMINATOR") | ||
.short("t") | ||
.long("terminator") | ||
.help("Terminator of the values") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You missed a dot at the end of the string
seq/src/main.rs
Outdated
let valid_range = (first <= last && inc > 0.0) || (first >= last && inc < 0.0); | ||
if valid_range { | ||
let seq = Seq::new(first, inc, last, decimals, separator, padding); | ||
for val in seq.into_iter() { | ||
print!("{}", val); | ||
} | ||
println!(); | ||
print!("\n{}", terminator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're print a newline before printing the terminator. If I remember correctly (almost 2 years since I had used FreeBSD seq), the behavior would to just print the terminator
Hey, I pushed another version, would you please take a look at it? I tried to format it with rust fmt. Thank you! |
bors r+ |
Awesome, would you please put the |
Issue #63