fix error if wasm-pack already installed #69
GitHub Actions / clippy
succeeded
Jan 21, 2024 in 0s
clippy
3 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 3 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.75.0 (82e1608df 2023-12-21)
- cargo 1.75.0 (1d8b05cdd 2023-11-20)
- clippy 0.1.75 (82e1608 2023-12-21)
Annotations
Check warning on line 591 in packages/ergo-lib-wasm/src/ir/constants.rs
github-actions / clippy
accessing first element with `self.values.get(0)`
warning: accessing first element with `self.values.get(0)`
--> packages/ergo-lib-wasm/src/ir/constants.rs:591:13
|
591 | self.values.get(0).unwrap().dyn_stype()
| ^^^^^^^^^^^^^^^^^^ help: try: `self.values.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
Check warning on line 82 in packages/ergo-lib-wasm/src/ir/constants.rs
github-actions / clippy
use of a fallible conversion when an infallible one could be used
warning: use of a fallible conversion when an infallible one could be used
--> packages/ergo-lib-wasm/src/ir/constants.rs:82:21
|
82 | let inner = Constant::try_from(bytes.to_vec()).map_err_js_value()?;
| ^^^^^^^^^^^^^^^^^^ help: use: `From::from`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
= note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
Check warning on line 18 in packages/scorex-buffer/src/lib.rs
github-actions / clippy
you should consider adding a `Default` implementation for `ScorexWriter`
warning: you should consider adding a `Default` implementation for `ScorexWriter`
--> packages/scorex-buffer/src/lib.rs:16:5
|
16 | / pub fn new() -> ScorexWriter {
17 | | ScorexWriter(vec![])
18 | | }
| |_____^
|
= 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
|
14 + impl Default for ScorexWriter {
15 + fn default() -> Self {
16 + Self::new()
17 + }
18 + }
|
Loading