cargo : warning: struct is never constructed: `Config` 所在位置 行:1 字符: 1 + cargo run poem.txt > output.txt 2> error.txt + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (warning: struct...ucted: `Config`:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError --> src\lib.rs:4:12 | 4 | pub struct Config { | ^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: associated function is never used: `new` --> src\lib.rs:11:12 | 11 | pub fn new() -> Result { | ^^^ warning: function is never used: `run` --> src\lib.rs:24:8 | 24 | pub fn run(config: Config) -> Result<(), Box> { | ^^^ warning: function is never used: `search` --> src\lib.rs:35:8 | 35 | pub fn search<'a>(query: &str, contents: &'a str) -> Vec<&'a str> { | ^^^^^^ warning: function is never used: `search_case_insensitive` --> src\lib.rs:41:8 | 41 | pub fn search_case_insensitive<'a>(query: &str, contents: &'a str) -> Vec<&'a str> { | ^^^^^^^^^^^^^^^^^^^^^^^ warning: `minigrep` (bin "minigrep") generated 5 warnings Finished dev [unoptimized + debuginfo] target(s) in 0.02s Running `target\debug\minigrep.exe poem.txt` Problem parsing arguments! not enough arguments error: process didn't exit successfully: `target\debug\minigrep.exe poem.txt` (exit code: 1)