From 3d249cc51cbfa76994f4b9b6e13673470d78d11a Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Fri, 22 Dec 2023 15:04:13 -0700 Subject: [PATCH] Upgraded to ratatui v0.25.0 --- Cargo.lock | 19 +++++++++++++++---- Cargo.toml | 2 +- src/ui/mod.rs | 4 +--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 241bea2..988b6af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -741,9 +741,9 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" dependencies = [ "either", ] @@ -1192,9 +1192,9 @@ dependencies = [ [[package]] name = "ratatui" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ebc917cfb527a566c37ecb94c7e3fd098353516fb4eb6bea17015ade0182425" +checksum = "a5659e52e4ba6e07b2dad9f1158f578ef84a73762625ddb51536019f34d180eb" dependencies = [ "bitflags 2.4.1", "cassowary", @@ -1203,6 +1203,7 @@ dependencies = [ "itertools", "lru", "paste", + "stability", "strum", "time", "unicode-segmentation", @@ -1563,6 +1564,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "stability" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd1b177894da2a2d9120208c3386066af06a488255caabc5de8ddca22dbc3ce" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "strum" version = "0.25.0" diff --git a/Cargo.toml b/Cargo.toml index 094dc6c..af70bdb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ strum = {version = "0.25.0", features = ["derive"] } strum_macros = "0.25.0" tokio = { version = "1.29.0", features = ["full"] } tokio-util = "0.7.8" -ratatui = { version = "0.24.0", features = ["all-widgets"] } +ratatui = { version = "0.25.0", features = ["all-widgets"] } urlencoding = "2.1.2" [dev-dependencies] diff --git a/src/ui/mod.rs b/src/ui/mod.rs index be84cd1..5ec762a 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -373,7 +373,7 @@ fn draw_table_contents<'a, T, F>( .style(style_default_bold()) .bottom_margin(0); - let mut table = Table::new(rows).header(headers).block(block); + let mut table = Table::new(rows, &constraints).header(headers).block(block); if highlight { table = table @@ -381,8 +381,6 @@ fn draw_table_contents<'a, T, F>( .highlight_symbol(HIGHLIGHT_SYMBOL); } - table = table.widths(&constraints); - f.render_stateful_widget(table, content_area, &mut content.state); }