summaryrefslogtreecommitdiff
path: root/src/widgets/sheetview
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2024-08-02 14:09:40 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2024-08-02 14:09:40 +0200
commitc920f258f6c9b0623a841b7c27561fa1d09cef72 (patch)
treea61474510657cefea020c694bb249ae16baf9a75 /src/widgets/sheetview
parent555a45a9f2b68a48b098099804ce795e3d5a350b (diff)
do some clippy cleanups
Diffstat (limited to 'src/widgets/sheetview')
-rw-r--r--src/widgets/sheetview/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/sheetview/mod.rs b/src/widgets/sheetview/mod.rs
index 2239a0b..96c4234 100644
--- a/src/widgets/sheetview/mod.rs
+++ b/src/widgets/sheetview/mod.rs
@@ -103,7 +103,7 @@ end)"#,
.selection_or_cursor()
.into_iter()
.for_each(|(r, c)| {
- sheet.set_cell(r as usize, c as usize, {
+ sheet.set_cell(r, c, {
let s = self.bar.input().unwrap();
match s.parse() {
Ok(n) => Cell::Number(n),
@@ -182,7 +182,7 @@ impl Widget for &mut SheetView {
self.scroll.0 = cursor.y();
}
- if cursor.x() >= viewport_columns + self.scroll.1 as usize {
+ if cursor.x() >= viewport_columns + self.scroll.1 {
self.scroll.1 = (cursor.x() - viewport_columns) + 1;
} else if cursor.x() < self.scroll.1 {
self.scroll.1 = cursor.x();
@@ -199,7 +199,7 @@ impl Widget for &mut SheetView {
for column in 0..(viewport_columns + 1) {
let (cell_pos_y, cell_pos_x) = (row + self.scroll.0, column + self.scroll.1);
- if let Some(cell_ref) = sheet.get_ref(cell_pos_y as usize, cell_pos_x as usize) {
+ if let Some(cell_ref) = sheet.get_ref(cell_pos_y, cell_pos_x) {
let cell = cell_ref.value().to_string() + " ";
let line = if (cell_pos_y, cell_pos_x) == (cursor.y(), cursor.x()) {