diff --git a/CHANGELOG.md b/CHANGELOG.md index 48560634cb..934f3b51a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +* Update `ratatui` to `0.26.1` ([#2094](https://github.com/extrawurst/gitui/issues/2094), [#2098](https://github.com/extrawurst/gitui/issues/2098)) + ## [0.25.1] - 2024-02-23 ### Fixes diff --git a/Cargo.lock b/Cargo.lock index 57c6cb47df..15facab24c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,6 +243,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" +[[package]] +name = "castaway" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a17ed5635fc8536268e5d4de1e22e81ac34419e5f052d4d51f4e01dcc263fcc" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" version = "1.0.83" @@ -304,6 +313,20 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "compact_str" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "ryu", + "serde", + "static_assertions", +] + [[package]] name = "core-foundation-sys" version = "0.8.6" @@ -679,7 +702,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] @@ -741,7 +764,7 @@ dependencies = [ "fuzzy-matcher", "gh-emoji", "indexmap", - "itertools 0.12.1", + "itertools", "log", "notify", "notify-debouncer-mini", @@ -869,15 +892,6 @@ dependencies = [ name = "invalidstring" version = "0.1.3" -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.12.1" @@ -1275,18 +1289,20 @@ dependencies = [ [[package]] name = "ratatui" -version = "0.24.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ebc917cfb527a566c37ecb94c7e3fd098353516fb4eb6bea17015ade0182425" +checksum = "bcb12f8fbf6c62614b0d56eb352af54f6a22410c3b079eb53ee93c7b97dd31d8" dependencies = [ "bitflags 2.4.2", "cassowary", + "compact_str", "crossterm", "indoc", - "itertools 0.11.0", + "itertools", "lru", "paste", "serde", + "stability", "strum", "unicode-segmentation", "unicode-width", @@ -1443,7 +1459,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] @@ -1479,7 +1495,7 @@ checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] @@ -1558,6 +1574,22 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +[[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 = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strsim" version = "0.11.0" @@ -1581,29 +1613,40 @@ checksum = "f14a349c27ebe59faba22f933c9c734d428da7231e88a247e9d8c61eea964ddb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] name = "strum" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn", + "syn 2.0.49", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] @@ -1677,7 +1720,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] @@ -1855,7 +1898,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.49", "wasm-bindgen-shared", ] @@ -1877,7 +1920,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2096,5 +2139,5 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] diff --git a/Cargo.toml b/Cargo.toml index 6be4ff107d..08623bbc80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ log = "0.4" notify = "6.1" notify-debouncer-mini = "0.4" once_cell = "1" -ratatui = { version = "=0.24.0", default-features = false, features = [ +ratatui = { version = "0.26.0", default-features = false, features = [ 'crossterm', 'serde', ] } diff --git a/src/app.rs b/src/app.rs index f2b4a4a9bb..da4c266f80 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1109,7 +1109,8 @@ impl App { let table_area = r; // use entire area to allow drawing the horizontal separator line let text_area = left_right[1]; - let tabs = tab_labels.into_iter().map(Line::from).collect(); + let tabs: Vec<_> = + tab_labels.into_iter().map(Line::from).collect(); f.render_widget( Tabs::new(tabs) diff --git a/src/components/commitlist.rs b/src/components/commitlist.rs index 84f9c3aed1..0ea64d61c4 100644 --- a/src/components/commitlist.rs +++ b/src/components/commitlist.rs @@ -528,7 +528,7 @@ impl CommitList { let author = string_width_align(&e.author, author_width); // commit author - txt.push(Span::styled::(author, style_author)); + txt.push(Span::styled::(author, style_author)); txt.push(splitter.clone()); diff --git a/src/popups/blame_file.rs b/src/popups/blame_file.rs index 62d1c748ee..cc1f51e8f8 100644 --- a/src/popups/blame_file.rs +++ b/src/popups/blame_file.rs @@ -136,8 +136,7 @@ impl DrawableComponent for BlameFilePopup { let title_with_highlight_progress = format!("{title}{syntax_highlight_progress}"); - let table = Table::new(rows) - .widths(&constraints) + let table = Table::new(rows, constraints) .column_spacing(1) .highlight_style(self.theme.text(true, true)) .block( diff --git a/src/popups/branchlist.rs b/src/popups/branchlist.rs index f7c9b94dd5..3b0d0c9ef4 100644 --- a/src/popups/branchlist.rs +++ b/src/popups/branchlist.rs @@ -690,7 +690,7 @@ impl BranchListPopup { } fn draw_tabs(&self, f: &mut Frame, r: Rect) { - let tabs = [Span::raw("Local"), Span::raw("Remote")] + let tabs: Vec<_> = [Span::raw("Local"), Span::raw("Remote")] .iter() .cloned() .map(Line::from) diff --git a/src/popups/file_revlog.rs b/src/popups/file_revlog.rs index 5450a27bf8..1bfc0b266e 100644 --- a/src/popups/file_revlog.rs +++ b/src/popups/file_revlog.rs @@ -389,8 +389,7 @@ impl FileRevlogPopup { let title = self.get_title(); let rows = self.get_rows(now); - let table = Table::new(rows) - .widths(&constraints) + let table = Table::new(rows, constraints) .column_spacing(1) .highlight_style(self.theme.text(true, true)) .block( diff --git a/src/popups/taglist.rs b/src/popups/taglist.rs index bc902c2642..2abe43e5e4 100644 --- a/src/popups/taglist.rs +++ b/src/popups/taglist.rs @@ -92,8 +92,7 @@ impl DrawableComponent for TagListPopup { let rows = self.get_rows(); let number_of_rows = rows.len(); - let table = Table::new(rows) - .widths(&constraints) + let table = Table::new(rows, constraints) .column_spacing(1) .highlight_style(self.theme.text(true, true)) .block( diff --git a/src/ui/scrolllist.rs b/src/ui/scrolllist.rs index 9d4f80a81a..d012ac9ab9 100644 --- a/src/ui/scrolllist.rs +++ b/src/ui/scrolllist.rs @@ -48,12 +48,10 @@ where { fn render(self, area: Rect, buf: &mut Buffer) { // Render items - List::new( - self.items.map(ListItem::new).collect::>(), - ) - .block(self.block.unwrap_or_default()) - .style(self.style) - .render(area, buf); + List::new(self.items.map(ListItem::new)) + .block(self.block.unwrap_or_default()) + .style(self.style) + .render(area, buf); } }