From 521662091b157170e75c257ac811e80379fd0be0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 00:54:47 +0000 Subject: [PATCH] chore(deps): bump rand in the cargo group across 1 directory Bumps the cargo group with 1 update in the / directory: [rand](https://github.com/rust-random/rand). Updates `rand` from 0.8.5 to 0.8.6 - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/0.8.6/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/0.8.5...0.8.6) --- updated-dependencies: - dependency-name: rand dependency-version: 0.8.6 dependency-type: indirect dependency-group: cargo ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- src/model.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 466a0fa..9dfe94e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1524,9 +1524,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "libc", "rand_chacha", diff --git a/src/model.rs b/src/model.rs index 8de4b29..0921df7 100644 --- a/src/model.rs +++ b/src/model.rs @@ -123,8 +123,7 @@ impl Model { .collect(); let items: Vec> = futures::future::join_all(items_future).await; self.tables = items.into_iter().collect::>>()?; - self.scroll_state = - ScrollbarState::new(self.tables.len().checked_sub(1).unwrap_or_default()); + self.scroll_state = ScrollbarState::new(self.tables.len().saturating_sub(1)); Ok(()) }