Skip to content

Commit

Permalink
feat: Updated fluere-plugin/src/util.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Jan 2, 2024
1 parent da010ba commit 0c14961
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fluere-plugin/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ pub fn home_cache_path() -> PathBuf {

let path_config = path_base.join("fluere");
if !path_config.exists() {
fs::create_dir_all(path_config.clone()).unwrap();
fs::create_dir_all(path_config.clone())
.map_err(|e| e.to_string())?;

Check failure on line 26 in fluere-plugin/src/util.rs

View workflow job for this annotation

GitHub Actions / clippy

the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::FromResidual`)

error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::FromResidual`) --> fluere-plugin/src/util.rs:26:40 | 7 | pub fn home_cache_path() -> PathBuf { | ----------------------------------- this function should return `Result` or `Option` to accept `?` ... 26 | .map_err(|e| e.to_string())?; | ^ cannot use the `?` operator in a function that returns `std::path::PathBuf` | = help: the trait `std::ops::FromResidual<std::result::Result<std::convert::Infallible, std::string::String>>` is not implemented for `std::path::PathBuf`
}
path_config
}

0 comments on commit 0c14961

Please sign in to comment.