Sweep: fix: git pull
on downloaded plugin does not working (✓ Sandbox Passed)
#363
Annotations
2 errors and 4 warnings
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#L25
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:25:75
|
7 | pub fn home_cache_path() -> PathBuf {
| ----------------------------------- this function should return `Result` or `Option` to accept `?`
...
25 | fs::create_dir_all(path_config.clone()).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`
|
build
Process completed with exit code 101.
|
unused import: `PathBuf`:
fluere-plugin/src/downloader.rs#L4
warning: unused import: `PathBuf`
--> fluere-plugin/src/downloader.rs:4:23
|
4 | use std::path::{Path, PathBuf};
| ^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
this import is redundant:
fluere-plugin/src/downloader.rs#L2
warning: this import is redundant
--> fluere-plugin/src/downloader.rs:2:1
|
2 | use git2;
| ^^^^^^^^^ help: remove it entirely
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
= note: `#[warn(clippy::single_component_path_imports)]` on by default
|
this function has too many arguments (27/7):
fluereflow/src/types/fluereflow.rs#L63
warning: this function has too many arguments (27/7)
--> fluereflow/src/types/fluereflow.rs:63:5
|
63 | / pub fn new(
64 | | source: IpAddr,
65 | | destination: IpAddr,
66 | | d_pkts: u32,
... |
90 | | tos: u8,
91 | | ) -> FluereRecord {
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
returning the result of a `let` binding from a block:
fluere-config/src/init.rs#L75
warning: returning the result of a `let` binding from a block
--> fluere-config/src/init.rs:75:5
|
74 | let path_config = path_base.join("fluere");
| ------------------------------------------- unnecessary `let` binding
75 | path_config
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
74 ~
75 ~ path_base.join("fluere")
|
|