Newby rust question - opts_present

'see underline code: can anyone please tell me why the “h” optsflag is not being recognised??


extern crate getopts;
use getopts::Options;
use std::env;

fn main() {

let args: Vec<String> = env::args().collect();  
println!("args {:?}", args);        // ************ see output
let mut opts = Options::new();
opts.optflag("h", "help", "Show this usage message.");
let matches = match opts.parse(&args[1..]) {
    Ok(m)  => { m }
    Err(e) => { panic!(e.to_string()) }

println!("matches {:?}",;  // *********** see output

**if !matches.opt_present("h") {**

** println!(“Not found”); // ******* see output**
** return;**
** }**

Finished dev [unoptimized + debuginfo] target(s) in 4.2 secs
Running target/debug/case_study ./uscitiespop.csv abbeabbeville h
args [“target/debug/case_study”, “./uscitiespop.csv”, “abbeabbeville”, “h”]
matches ["./uscitiespop.csv", “abbeabbeville”, “h”]
not found

Short options are preceded by a hyphen, long options by a double hyphen. Pass -h (or --help) and it will be recognized.

Thank you for your reply.