intcmp(1): rewrite in Rust #144
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "intcmp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +34,4 @@
fn main() -> ExitCode {
let argv = args().collect::<Vec<String>>();
let mut can_eq = false;
These variable names can be the flags with a comment:
@ -0,0 +51,4 @@
optind = opt.ind();
}
if argv.len() - optind < 2 /* ref cmp */ { return usage(&argv[0]); }
This comment needs to be more descriptive. What does
ref cmp
mean? Refer to comparison? Reflect comparison? Refine complexity?@ -0,0 +53,4 @@
if argv.len() - optind < 2 /* ref cmp */ { return usage(&argv[0]); }
let mut reference: Option<usize> = None;
This either needs to be commented or needs to have a more descriptive variable name. This is not a reference as far as I’m aware so I’m kind of confused why this is called that.
@ -0,0 +65,4 @@
}
}
if let Some(refn) = reference {
This block needs to be commented to explain what’s going on.
Merged.
Pull request closed