Update sample code to use `getopts::usage` in `print_usage`
auto merge of #19695 : arthurtw/rust/master, r=steveklabnik