Sweep: fix: git pull
on downloaded plugin does not working (✓ Sandbox Passed)
#54
rust-fmt.yml
on: pull_request
Run rustfmt style commit
12s
Annotations
2 errors and 3 warnings
mismatched types:
fluere-plugin/src/util.rs#L32
error[E0308]: mismatched types
--> fluere-plugin/src/util.rs:32:5
|
7 | pub fn home_cache_path() -> Result<PathBuf, std::io::Error> {
| ------------------------------- expected `std::result::Result<std::path::PathBuf, std::io::Error>` because of return type
...
32 | path_config
| ^^^^^^^^^^^ expected `Result<PathBuf, Error>`, found `PathBuf`
|
= note: expected enum `std::result::Result<std::path::PathBuf, std::io::Error>`
found struct `std::path::PathBuf`
help: try wrapping the expression in `Ok`
|
32 | Ok(path_config)
| +++ +
|
the `?` operator can only be applied to values that implement `std::ops::Try`:
fluere-plugin/src/downloader.rs#L10
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> fluere-plugin/src/downloader.rs:10:9
|
10 | if !path?.exists() {
| ^^^^^ the `?` operator cannot be applied to type `std::path::PathBuf`
|
= help: the trait `std::ops::Try` is not implemented for `std::path::PathBuf`
|
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")
|
|