fop(1): updated to latest optind api
This commit is contained in:
parent
e862b7fec6
commit
02daca87dc
@ -44,13 +44,13 @@ fn main() {
|
||||
Ok(o) => {
|
||||
/* unwrap because Err(OptError::MissingArg) will be returned if
|
||||
* o.arg is None */
|
||||
let arg = o.arg.unwrap();
|
||||
let arg = o.arg.clone().unwrap();
|
||||
let arg_char = arg.chars().collect::<Vec<char>>();
|
||||
if arg_char.len() > 1 {
|
||||
eprintln!("{}: {}: Not a character.", argv[0], arg);
|
||||
exit(EX_USAGE);
|
||||
} else { d = arg_char[0]; }
|
||||
unsafe { index_arg = *o.ind as usize; }
|
||||
index_arg = o.index();
|
||||
},
|
||||
Err(_) => {
|
||||
eprintln!("{}", usage);
|
||||
|
Loading…
Reference in New Issue
Block a user