Skip to content

promises-features - interactor #1158

promises-features - interactor

promises-features - interactor #1158

GitHub Actions / clippy failed Jan 30, 2025 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (6)

contracts/feature-tests/composability/promises-features/interactor/src/config.rs|25 col 5| warning: you should consider adding a Default implementation for Config
--> contracts/feature-tests/composability/promises-features/interactor/src/config.rs:25:5
|
25 | / pub fn new() -> Self {
26 | | let mut file = std::fs::File::open(CONFIG_FILE).unwrap();
27 | | let mut content = String::new();
28 | | file.read_to_string(&mut content).unwrap();
29 | | toml::from_str(&content).unwrap()
30 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: #[warn(clippy::new_without_default)] on by default
help: try adding this
|
23 + impl Default for Config {
24 + fn default() -> Self {
25 + Self::new()
26 + }
27 + }
|
contracts/feature-tests/composability/promises-features/interactor/src/interact.rs|359 col 5| warning: this function has too many arguments (9/7)
--> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:359:5
|
359 | / pub async fn promise_raw_single_token(
360 | | &mut self,
361 | | token_id: &str,
362 | | token_nonce: u64,
... |
368 | | args: &Vec<&str>,
369 | | ) {
| |
^
|
= 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
contracts/feature-tests/composability/promises-features/interactor/src/interact.rs|377 col 14| warning: this .into_iter() call is equivalent to .iter() and will not consume the Vec
--> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:377:14
|
377 | .into_iter()
| ^^^^^^^^^ help: call directly: iter
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: #[warn(clippy::into_iter_on_ref)] on by default
contracts/feature-tests/composability/promises-features/interactor/src/config.rs|25 col 5| warning: you should consider adding a Default implementation for Config
--> contracts/feature-tests/composability/promises-features/interactor/src/config.rs:25:5
|
25 | / pub fn new() -> Self {
26 | | let mut file = std::fs::File::open(CONFIG_FILE).unwrap();
27 | | let mut content = String::new();
28 | | file.read_to_string(&mut content).unwrap();
29 | | toml::from_str(&content).unwrap()
30 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: #[warn(clippy::new_without_default)] on by default
help: try adding this
|
23 + impl Default for Config {
24 + fn default() -> Self {
25 + Self::new()
26 + }
27 + }
|
contracts/feature-tests/composability/promises-features/interactor/src/interact.rs|359 col 5| warning: this function has too many arguments (9/7)
--> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:359:5
|
359 | / pub async fn promise_raw_single_token(
360 | | &mut self,
361 | | token_id: &str,
362 | | token_nonce: u64,
... |
368 | | args: &Vec<&str>,
369 | | ) {
| |
^
|
= 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
contracts/feature-tests/composability/promises-features/interactor/src/interact.rs|377 col 14| warning: this .into_iter() call is equivalent to .iter() and will not consume the Vec
--> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:377:14
|
377 | .into_iter()
| ^^^^^^^^^ help: call directly: iter
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: #[warn(clippy::into_iter_on_ref)] on by default

Filtered Findings (0)

Annotations

Check warning on line 25 in contracts/feature-tests/composability/promises-features/interactor/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/feature-tests/composability/promises-features/interactor/src/config.rs#L25

warning: you should consider adding a `Default` implementation for `Config`
  --> contracts/feature-tests/composability/promises-features/interactor/src/config.rs:25:5
   |
25 | /     pub fn new() -> Self {
26 | |         let mut file = std::fs::File::open(CONFIG_FILE).unwrap();
27 | |         let mut content = String::new();
28 | |         file.read_to_string(&mut content).unwrap();
29 | |         toml::from_str(&content).unwrap()
30 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
23 + impl Default for Config {
24 +     fn default() -> Self {
25 +         Self::new()
26 +     }
27 + }
   |
Raw output
contracts/feature-tests/composability/promises-features/interactor/src/config.rs:25:5:w:warning: you should consider adding a `Default` implementation for `Config`
  --> contracts/feature-tests/composability/promises-features/interactor/src/config.rs:25:5
   |
25 | /     pub fn new() -> Self {
26 | |         let mut file = std::fs::File::open(CONFIG_FILE).unwrap();
27 | |         let mut content = String::new();
28 | |         file.read_to_string(&mut content).unwrap();
29 | |         toml::from_str(&content).unwrap()
30 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
23 + impl Default for Config {
24 +     fn default() -> Self {
25 +         Self::new()
26 +     }
27 + }
   |


__END__

Check warning on line 359 in contracts/feature-tests/composability/promises-features/interactor/src/interact.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/feature-tests/composability/promises-features/interactor/src/interact.rs#L359

warning: this function has too many arguments (9/7)
   --> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:359:5
    |
359 | /     pub async fn promise_raw_single_token(
360 | |         &mut self,
361 | |         token_id: &str,
362 | |         token_nonce: u64,
...   |
368 | |         args: &Vec<&str>,
369 | |     ) {
    | |_____^
    |
    = 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
Raw output
contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:359:5:w:warning: this function has too many arguments (9/7)
   --> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:359:5
    |
359 | /     pub async fn promise_raw_single_token(
360 | |         &mut self,
361 | |         token_id: &str,
362 | |         token_nonce: u64,
...   |
368 | |         args: &Vec<&str>,
369 | |     ) {
    | |_____^
    |
    = 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


__END__

Check warning on line 377 in contracts/feature-tests/composability/promises-features/interactor/src/interact.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/feature-tests/composability/promises-features/interactor/src/interact.rs#L377

warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
   --> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:377:14
    |
377 |             .into_iter()
    |              ^^^^^^^^^ help: call directly: `iter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
    = note: `#[warn(clippy::into_iter_on_ref)]` on by default
Raw output
contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:377:14:w:warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
   --> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:377:14
    |
377 |             .into_iter()
    |              ^^^^^^^^^ help: call directly: `iter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
    = note: `#[warn(clippy::into_iter_on_ref)]` on by default


__END__

Check warning on line 25 in contracts/feature-tests/composability/promises-features/interactor/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/feature-tests/composability/promises-features/interactor/src/config.rs#L25

warning: you should consider adding a `Default` implementation for `Config`
  --> contracts/feature-tests/composability/promises-features/interactor/src/config.rs:25:5
   |
25 | /     pub fn new() -> Self {
26 | |         let mut file = std::fs::File::open(CONFIG_FILE).unwrap();
27 | |         let mut content = String::new();
28 | |         file.read_to_string(&mut content).unwrap();
29 | |         toml::from_str(&content).unwrap()
30 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
23 + impl Default for Config {
24 +     fn default() -> Self {
25 +         Self::new()
26 +     }
27 + }
   |
Raw output
contracts/feature-tests/composability/promises-features/interactor/src/config.rs:25:5:w:warning: you should consider adding a `Default` implementation for `Config`
  --> contracts/feature-tests/composability/promises-features/interactor/src/config.rs:25:5
   |
25 | /     pub fn new() -> Self {
26 | |         let mut file = std::fs::File::open(CONFIG_FILE).unwrap();
27 | |         let mut content = String::new();
28 | |         file.read_to_string(&mut content).unwrap();
29 | |         toml::from_str(&content).unwrap()
30 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
23 + impl Default for Config {
24 +     fn default() -> Self {
25 +         Self::new()
26 +     }
27 + }
   |


__END__

Check warning on line 359 in contracts/feature-tests/composability/promises-features/interactor/src/interact.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/feature-tests/composability/promises-features/interactor/src/interact.rs#L359

warning: this function has too many arguments (9/7)
   --> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:359:5
    |
359 | /     pub async fn promise_raw_single_token(
360 | |         &mut self,
361 | |         token_id: &str,
362 | |         token_nonce: u64,
...   |
368 | |         args: &Vec<&str>,
369 | |     ) {
    | |_____^
    |
    = 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
Raw output
contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:359:5:w:warning: this function has too many arguments (9/7)
   --> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:359:5
    |
359 | /     pub async fn promise_raw_single_token(
360 | |         &mut self,
361 | |         token_id: &str,
362 | |         token_nonce: u64,
...   |
368 | |         args: &Vec<&str>,
369 | |     ) {
    | |_____^
    |
    = 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


__END__

Check warning on line 377 in contracts/feature-tests/composability/promises-features/interactor/src/interact.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/feature-tests/composability/promises-features/interactor/src/interact.rs#L377

warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
   --> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:377:14
    |
377 |             .into_iter()
    |              ^^^^^^^^^ help: call directly: `iter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
    = note: `#[warn(clippy::into_iter_on_ref)]` on by default
Raw output
contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:377:14:w:warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
   --> contracts/feature-tests/composability/promises-features/interactor/src/interact.rs:377:14
    |
377 |             .into_iter()
    |              ^^^^^^^^^ help: call directly: `iter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
    = note: `#[warn(clippy::into_iter_on_ref)]` on by default


__END__