我正在使用 Rust 的structopt
crate,但是当我尝试编译示例时,出现以下错误,
error[E0277]: the trait bound `String: From<&OsStr>` is not satisfied
--> bin/seq.rs:21:36
|
21 | #[structopt(short, long, parse(from_os_str))]
| ^^^^^^^^^^^ the trait `From<&OsStr>` is not implemented for `String`
|
= help: the following implementations were found:
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
and 2 others
note: required by `from`