Fix git pull operation and panic error on macOS #358
Annotations
6 errors and 2 warnings
no method named `join` found for enum `std::result::Result` in the current scope:
fluere-plugin/src/downloader.rs#L11
error[E0599]: no method named `join` found for enum `std::result::Result` in the current scope
--> fluere-plugin/src/downloader.rs:11:13
|
11 | if path.join(repo_name.split('/').last().unwrap()).exists() {
| ^^^^ method not found in `Result<PathBuf, Error>`
|
note: the method `join` exists on the type `std::path::PathBuf`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/path.rs:2550:5
help: use the `?` operator to extract the `std::path::PathBuf` value, propagating a `Result::Err` value to the caller
|
11 | if path?.join(repo_name.split('/').last().unwrap()).exists() {
| +
|
the method `clone` exists for enum `Result<PathBuf, Error>`, but its trait bounds were not satisfied:
fluere-plugin/src/downloader.rs#L9
error[E0599]: the method `clone` exists for enum `Result<PathBuf, Error>`, but its trait bounds were not satisfied
--> fluere-plugin/src/downloader.rs:9:38
|
9 | std::fs::create_dir_all(path.clone())?;
| ^^^^^ method cannot be called on `Result<PathBuf, Error>` due to unsatisfied trait bounds
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:502:1
|
= note: doesn't satisfy `_: Clone`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/io/error.rs:67:1
|
= note: doesn't satisfy `std::io::Error: std::clone::Clone`
|
= note: the following trait bounds were not satisfied:
`std::io::Error: std::clone::Clone`
which is required by `std::result::Result<std::path::PathBuf, std::io::Error>: std::clone::Clone`
note: the method `clone` exists on the type `std::path::PathBuf`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/clone.rs:160:5
help: use the `?` operator to extract the `std::path::PathBuf` value, propagating a `Result::Err` value to the caller
|
9 | std::fs::create_dir_all(path?.clone())?;
| +
|
no method named `exists` found for enum `std::result::Result` in the current scope:
fluere-plugin/src/downloader.rs#L8
error[E0599]: no method named `exists` found for enum `std::result::Result` in the current scope
--> fluere-plugin/src/downloader.rs:8:14
|
8 | if !path.exists() {
| ^^^^^^ method not found in `Result<PathBuf, Error>`
|
note: the method `exists` exists on the type `std::path::PathBuf`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/path.rs:2861:5
help: use the `?` operator to extract the `std::path::PathBuf` value, propagating a `Result::Err` value to the caller
|
8 | if !path?.exists() {
| +
|
no method named `display` found for enum `std::result::Result` in the current scope:
fluere-plugin/src/downloader.rs#L7
error[E0599]: no method named `display` found for enum `std::result::Result` in the current scope
--> fluere-plugin/src/downloader.rs:7:40
|
7 | let cd_cmd = format!("cd {}", path.display());
| ^^^^^^^ method not found in `Result<PathBuf, Error>`
|
note: the method `display` exists on the type `std::path::PathBuf`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/path.rs:2727:5
help: use the `?` operator to extract the `std::path::PathBuf` value, propagating a `Result::Err` value to the caller
|
7 | let cd_cmd = format!("cd {}", path?.display());
| +
|
no method named `join` found for enum `std::result::Result` in the current scope:
fluere-plugin/src/lib.rs#L106
error[E0599]: no method named `join` found for enum `std::result::Result` in the current scope
--> fluere-plugin/src/lib.rs:106:62
|
106 | ... let path = home_cache_path().join(name.split('/').last().unwrap());
| ^^^^ method not found in `Result<PathBuf, Error>`
|
note: the method `join` exists on the type `std::path::PathBuf`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/path.rs:2550:5
help: use the `?` operator to extract the `std::path::PathBuf` value, propagating a `Result::Err` value to the caller
|
106 | let path = home_cache_path()?.join(name.split('/').last().unwrap());
| +
|
build
Process completed with exit code 101.
|
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")
|
|