feat(mouse): enhance mouse events with grid coordinates #157
Annotations
10 warnings
|
Run clippy action:
src/backend/utils.rs#L211
warning: used `unwrap()` on a `Result` value
--> src/backend/utils.rs:211:13
|
211 | let s = web_sys::window().unwrap().screen().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/rust-1.93.0/index.html#unwrap_used
|
|
Run clippy action:
src/backend/utils.rs#L188
warning: used `unwrap()` on an `Option` value
--> src/backend/utils.rs:188:54
|
188 | let color = ansi_to_rgb(color).unwrap_or_else(|| ansi_to_rgb(fallback_color).unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, 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/rust-1.93.0/index.html#unwrap_used
|
|
Run clippy action:
src/backend/webgl2.rs#L950
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/backend/webgl2.rs:950:15
|
950 | callback: Rc<RefCell<dyn FnMut(&str)>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#type_complexity
|
|
Run clippy action:
src/backend/webgl2.rs#L603
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/backend/webgl2.rs:603:19
|
603 | callback: Rc<RefCell<dyn FnMut(&str)>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
|
Run clippy action:
src/backend/canvas.rs#L422
warning: used `unwrap()` on an `Option` value
--> src/backend/canvas.rs:422:21
|
422 | let color = self.debug_mode.as_ref().unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, 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/rust-1.93.0/index.html#unwrap_used
note: the lint level is defined here
--> src/lib.rs:1:23
|
1 | #![warn(missing_docs, clippy::unwrap_used)]
| ^^^^^^^^^^^^^^^^^^^
|
|
Run clippy action:
src/backend/canvas.rs#L290
warning: doc list item without indentation
--> src/backend/canvas.rs:290:9
|
290 | /// or when `always_clip_cells` is enabled.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
290 | /// or when `always_clip_cells` is enabled.
| +++
|
|
Run clippy action:
src/error.rs#L58
warning: this can be `std::io::Error::other(_)`
--> src/error.rs:58:9
|
58 | std::io::Error::new(std::io::ErrorKind::Other, error.to_string())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#io_other_error
= note: `#[warn(clippy::io_other_error)]` on by default
help: use `std::io::Error::other`
|
58 - std::io::Error::new(std::io::ErrorKind::Other, error.to_string())
58 + std::io::Error::other(error.to_string())
|
|
|
Run clippy action:
src/backend/dom.rs#L319
warning: this `if` statement can be collapsed
--> src/backend/dom.rs:319:13
|
319 | / if cell.symbol().len() > 1 && cell.symbol().width() == 2 {
320 | | if (cell_position + 1) < self.cells.len() {
321 | | let next_elem = &self.cells[cell_position + 1];
322 | | next_elem.set_inner_html("");
... |
327 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
319 ~ if cell.symbol().len() > 1 && cell.symbol().width() == 2
320 ~ && (cell_position + 1) < self.cells.len() {
321 | let next_elem = &self.cells[cell_position + 1];
...
325 | .map_err(Error::from)?;
326 ~ }
|
|
|
Run clippy action:
src/backend/dom.rs#L55
warning: doc list item overindented
--> src/backend/dom.rs:55:9
|
55 | /// `"_ratzilla_grid"`.
| ^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#doc_overindented_list_items
= note: `#[warn(clippy::doc_overindented_list_items)]` on by default
|
|
Run clippy action:
src/backend/dom.rs#L85
warning: fields `window` and `resize_callback` are never read
--> src/backend/dom.rs:85:5
|
75 | pub struct DomBackend {
| ---------- fields in this struct
...
85 | window: Window,
| ^^^^^^
...
99 | resize_callback: EventCallback<web_sys::Event>,
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
|
Loading