We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efdb77b commit 96d1712Copy full SHA for 96d1712
src/libgetopts/lib.rs
@@ -372,7 +372,7 @@ impl Matches {
372
}
373
374
fn is_arg(arg: &str) -> bool {
375
- arg.len() > 1 && arg.as_bytes()[0] == '-' as u8
+ arg.len() > 1 && arg.as_bytes()[0] == b'-'
376
377
378
fn find_opt(opts: &[Opt], nm: Name) -> Option<uint> {
@@ -555,7 +555,7 @@ pub fn getopts(args: &[String], optgrps: &[OptGroup]) -> Result {
555
} else {
556
let mut names;
557
let mut i_arg = None;
558
- if cur.as_bytes()[1] == '-' as u8 {
+ if cur.as_bytes()[1] == b'-' {
559
let tail = cur.as_slice().slice(2, curlen);
560
let tail_eq: Vec<&str> = tail.split('=').collect();
561
if tail_eq.len() <= 1 {
0 commit comments