("git -C {} status", dir.as_path().display().to_string())); 我使用的是converts my PathBuf variable to a String上面的代码,但是这是最好的方法吗?有没有一种方法可以在不转换的情况下使用PathBuf变量?
告诉我,如果我需要提供更多的信息,我是相当新的这里。以下是代码:path: "Some(\"assets/images/tiles/air.png\")" }', src/main.rs:71:43
note: run with `RUST_BACKTRACE=1` environment variable
我正在尝试编写一个函数,将的输出(即Result<Paths, PatternError> )转换为Result<Vec<PathBuf>, Error>。我有自己的Error类型,它实现了glob::GlobError和glob::PatternError的From。目前,我已经实现了以下内容: O