Closed
Description
Rust 0.4 throws warnings about non-implicitly copyable types when using getopts in (what I consider) to be normal usage
let matches = match getopts(args, opts) {
result::Ok(m) => copy m, //Need to copy... Not expected, but understandable
result::Err(f) => fail fail_str(copy f) //Need to copy here too, but it's a failure!
}
let thing = if opt_present(copy matches, "o") { // Not expected here either
"o given"
} else {
"o not given"
}
I'm sure some of it is me failing at the language, but it's a major toe-stub since I'm not expecting to have to copy everything around, especially when I'm not expecting any of the functions to change the data.