Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enclaves: light client check #69

Merged
merged 29 commits into from
Jul 24, 2024

Merge branch 'hu55a1n1/22-mtcs-enclave-light-client-check' of github.…

5963400
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

enclaves: light client check #69

Merge branch 'hu55a1n1/22-mtcs-enclave-light-client-check' of github.…
5963400
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Jul 24, 2024 in 0s

clippy

20 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 20
Note 0
Help 0

Versions

  • rustc 1.79.0 (129f3b996 2024-06-10)
  • cargo 1.79.0 (ffa9cf99a 2024-06-03)
  • clippy 0.1.79 (129f3b9 2024-06-10)

Annotations

Check warning on line 320 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:320:28
    |
320 |             println!("{}", AccountId::new("wasm", tm_pk.as_bytes()).unwrap());
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 310 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:310:22
    |
310 |             let sk = XPrv::from_str(&sk_str).unwrap();
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 307 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:307:28
    |
307 |             println!("{}", AccountId::new("wasm", tm_pk.as_bytes()).unwrap());
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 298 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:298:26
    |
298 |             let setoff = decrypt(&sk.to_bytes(), &ciphertext).unwrap();
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 296 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:296:30
    |
296 |             let ciphertext = hex::decode(setoff).unwrap();
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 276 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:276:17
    |
276 |                 d.try_into().unwrap()
    |                 ^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 255 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:255:25
    |
255 |                 let o = decrypt(&sk.to_bytes(), &ciphertext).unwrap();
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 252 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:252:30
    |
252 |             let ciphertext = hex::decode(obligation).unwrap();
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
note: the lint level is defined here
   --> utils/mtcs-intent/src/main.rs:6:5
    |
6   |     clippy::unwrap_used,
    |     ^^^^^^^^^^^^^^^^^^^

Check warning on line 320 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:320:28
    |
320 |             println!("{}", AccountId::new("wasm", tm_pk.as_bytes()).unwrap());
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 310 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:310:22
    |
310 |             let sk = XPrv::from_str(&sk_str).unwrap();
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 307 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:307:28
    |
307 |             println!("{}", AccountId::new("wasm", tm_pk.as_bytes()).unwrap());
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 298 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:298:26
    |
298 |             let setoff = decrypt(&sk.to_bytes(), &ciphertext).unwrap();
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 296 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:296:30
    |
296 |             let ciphertext = hex::decode(setoff).unwrap();
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 276 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:276:17
    |
276 |                 d.try_into().unwrap()
    |                 ^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 255 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:255:25
    |
255 |                 let o = decrypt(&sk.to_bytes(), &ciphertext).unwrap();
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

Check warning on line 252 in utils/mtcs-intent/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> utils/mtcs-intent/src/main.rs:252:30
    |
252 |             let ciphertext = hex::decode(obligation).unwrap();
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: if this value is an `Err`, it will panic
    = help: consider using `expect()` to provide a better panic message
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
note: the lint level is defined here
   --> utils/mtcs-intent/src/main.rs:6:5
    |
6   |     clippy::unwrap_used,
    |     ^^^^^^^^^^^^^^^^^^^

Check warning on line 380 in utils/cycles-sync/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> utils/cycles-sync/src/main.rs:380:41
    |
380 |         let mnemonic = Mnemonic::random(&mut OsRng, Default::default());
    |                                         ^^^^^^^^^^ help: change this to: `OsRng`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
    = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

Check warning on line 117 in utils/cycles-sync/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you are explicitly cloning with `.map()`

warning: you are explicitly cloning with `.map()`
   --> utils/cycles-sync/src/main.rs:115:48
    |
115 |                   let (debtor_id, creditor_id) = obligation_user_map
    |  ________________________________________________^
116 | |                     .get(obligation_digest)
117 | |                     .map(Clone::clone)
    | |______________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
    = note: `#[warn(clippy::map_clone)]` on by default
help: consider calling the dedicated `copied` method
    |
115 ~                 let (debtor_id, creditor_id) = obligation_user_map
116 +                     .get(obligation_digest).copied()
    |

Check warning on line 117 in utils/cycles-sync/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you are explicitly cloning with `.map()`

warning: you are explicitly cloning with `.map()`
   --> utils/cycles-sync/src/main.rs:115:48
    |
115 |                   let (debtor_id, creditor_id) = obligation_user_map
    |  ________________________________________________^
116 | |                     .get(obligation_digest)
117 | |                     .map(Clone::clone)
    | |______________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
    = note: `#[warn(clippy::map_clone)]` on by default
help: consider calling the dedicated `copied` method
    |
115 ~                 let (debtor_id, creditor_id) = obligation_user_map
116 +                     .get(obligation_digest).copied()
    |

Check warning on line 6 in apps/transfers/contracts/src/msg.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused imports: `Deserialize`, `Serialize`

warning: unused imports: `Deserialize`, `Serialize`
 --> apps/transfers/contracts/src/msg.rs:6:13
  |
6 | use serde::{Deserialize, Serialize};
  |             ^^^^^^^^^^^  ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default