Fix git pull issue and unwrap error #351
Annotations
5 errors and 2 warnings
no method named `join` found for enum `std::result::Result` in the current scope:
fluere-plugin/src/util.rs#L30
error[E0599]: no method named `join` found for enum `std::result::Result` in the current scope
--> fluere-plugin/src/util.rs:30:32
|
30 | let path_cache = path_base.join("fluere");
| ^^^^ method not found in `Result<PathBuf, Error>`
|
note: the method `join` exists on the type `std::path::PathBuf`
--> /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/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
|
30 | let path_cache = path_base?.join("fluere");
| +
|
the `?` operator can only be applied to values that implement `std::ops::Try`:
fluere-plugin/src/downloader.rs#L19
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> fluere-plugin/src/downloader.rs:19:27
|
19 | .current_dir(&path?)
| ^^^^^ the `?` operator cannot be applied to type `std::path::PathBuf`
|
= help: the trait `std::ops::Try` is not implemented for `std::path::PathBuf`
|
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:21
|
10 | let repo_path = path?.join(repo_name.split('/').last().unwrap());
| ^^^^^ the `?` operator cannot be applied to type `std::path::PathBuf`
|
= help: the trait `std::ops::Try` is not implemented for `std::path::PathBuf`
|
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/cc66ad468955717ab92600c770da8c1601a4ff33/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")
|
|