Support for Tauri Events #41
Annotations
5 errors and 21 warnings
build (macos-latest)
Process completed with exit code 101.
|
build (ubuntu-latest)
The job was canceled because "macos-latest" failed.
|
build (ubuntu-latest)
The operation was canceled.
|
build (windows-latest)
The job was canceled because "macos-latest" failed.
|
build (windows-latest)
The operation was canceled.
|
used `unwrap()` on a `Result` value:
src/lib.rs#L335
warning: used `unwrap()` on a `Result` value
--> src/lib.rs:335:42
|
335 | let (invoke_handler, registry) = self.export_inner().unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you don't want to handle the `Err` case gracefully, 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
|
used `unwrap()` on a `Result` value:
src/event.rs#L97
warning: used `unwrap()` on a `Result` value
--> src/event.rs:97:26
|
97 | payload: serde_json::from_value(value).unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you don't want to handle the `Err` case gracefully, 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
|
used `unwrap()` on a `Result` value:
src/event.rs#L77
warning: used `unwrap()` on a `Result` value
--> src/event.rs:77:26
|
77 | payload: serde_json::from_value(value).unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you don't want to handle the `Err` case gracefully, 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
--> src/lib.rs:91:22
|
91 | #![warn(clippy::all, clippy::unwrap_used, clippy::panic
| ^^^^^^^^^^^^^^^^^^^
|
this `impl` can be derived:
src/event.rs#L15
warning: this `impl` can be derived
--> src/event.rs:15:1
|
15 | / impl Default for EventRegistry {
16 | | fn default() -> Self {
17 | | Self(BTreeSet::new())
18 | | }
19 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` implied by `#[warn(clippy::all)]`
= help: remove the manual implementation...
help: ...and instead derive it
|
7 + #[derive(Default)]
8 | pub struct EventRegistry(pub(crate) BTreeSet<&'static str>);
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/ts.rs#L165
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/ts.rs:165:57
|
165 | .map(|v| ts::export_datatype(&cfg.inner, v, &type_map))
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/ts.rs#L160
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/ts.rs:160:50
|
160 | let events = Self::render_events(events, &type_map, cfg)?;
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/ts.rs#L159
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/ts.rs:159:56
|
159 | let commands = Self::render_commands(commands, &type_map, cfg)?;
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/ts.rs#L59
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/ts.rs:59:57
|
59 | ... ts::datatype(&cfg.inner, e, &type_map)?
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/ts.rs#L50
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/ts.rs:50:53
|
50 | ts::datatype(&cfg.inner, t, &type_map)?
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/ts.rs#L47
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/ts.rs:47:53
|
47 | ts::datatype(&cfg.inner, t, &type_map)?
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/ts.rs#L39
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/ts.rs:39:55
|
39 | ts::datatype(&cfg.inner, typ, &type_map)
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`:
src/ts.rs#L29
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
--> src/ts.rs:29:14
|
29 | .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
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/js.rs#L155
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/js.rs:155:50
|
155 | let events = Self::render_events(events, &type_map, cfg)?;
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/js.rs#L154
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/js.rs:154:56
|
154 | let commands = Self::render_commands(commands, &type_map, cfg)?;
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/js.rs#L60
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/js.rs:60:59
|
60 | ... ts::datatype(&cfg.inner, typ, &type_map).map(|typ| {
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/js.rs#L51
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/js.rs:51:61
|
51 | ... ts::datatype(&cfg.inner, e, &type_map)?
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/js.rs#L50
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/js.rs:50:61
|
50 | ... ts::datatype(&cfg.inner, t, &type_map)?,
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/js.rs#L45
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/js.rs:45:57
|
45 | ... ts::datatype(&cfg.inner, t, &type_map)?
| ^^^^^^^^^ help: change this to: `type_map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` implied by `#[warn(clippy::all)]`
|
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`:
src/js.rs#L30
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
--> src/js.rs:30:14
|
30 | .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: the lint level is defined here
--> src/lib.rs:91:9
|
91 | #![warn(clippy::all, clippy::unwrap_used, clippy::panic
| ^^^^^^^^^^^
= note: `#[warn(clippy::into_iter_on_ref)]` implied by `#[warn(clippy::all)]`
|
unused variable: `typ`:
src/js.rs#L129
warning: unused variable: `typ`
--> src/js.rs:129:21
|
129 | let typ = ts::datatype(&cfg.inner, &event.typ, type_map)?;
| ^^^ help: if this is intentional, prefix it with an underscore: `_typ`
|
= note: `#[warn(unused_variables)]` on by default
|
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|