mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 00:48:35 +00:00
Rust msrv bump to 1.88 (#2879)
This commit is contained in:
parent
268d8ab175
commit
5d6731326e
38 changed files with 78 additions and 70 deletions
|
|
@ -1,2 +1,2 @@
|
|||
msrv = "1.82.0"
|
||||
msrv = "1.88.0"
|
||||
cognitive-complexity-threshold = 18
|
||||
|
|
|
|||
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
rust: [nightly, stable, "1.82"]
|
||||
rust: [nightly, stable, "1.88"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
rust: [nightly, stable, "1.82"]
|
||||
rust: [nightly, stable, "1.88"]
|
||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -148,7 +148,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
rust: [nightly, stable, "1.82"]
|
||||
rust: [nightly, stable, "1.88"]
|
||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -199,7 +199,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
rust: [nightly, stable, "1.82"]
|
||||
rust: [nightly, stable, "1.88"]
|
||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Changed
|
||||
* rust msrv bumped to `1.88`
|
||||
|
||||
## [0.28.0] - 2025-12-14
|
||||
|
||||
**discard changes on checkout**
|
||||
|
|
|
|||
32
Cargo.toml
32
Cargo.toml
|
|
@ -4,14 +4,14 @@ version = "0.28.0"
|
|||
authors = ["extrawurst <mail@rusticorn.com>"]
|
||||
description = "blazing fast terminal-ui for git"
|
||||
edition = "2021"
|
||||
rust-version = "1.82"
|
||||
rust-version = "1.88"
|
||||
exclude = [".github/*", ".vscode/*", "assets/*"]
|
||||
homepage = "https://github.com/gitui-org/gitui"
|
||||
repository = "https://github.com/gitui-org/gitui"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
categories = ["command-line-utilities"]
|
||||
keywords = ["git", "gui", "cli", "terminal", "ui"]
|
||||
keywords = ["cli", "git", "gui", "terminal", "ui"]
|
||||
build = "build.rs"
|
||||
|
||||
[workspace]
|
||||
|
|
@ -43,7 +43,7 @@ bugreport = "0.5.1"
|
|||
bwrap = { version = "1.3", features = ["use_std"] }
|
||||
bytesize = { version = "2.3", default-features = false }
|
||||
chrono = { version = "0.4", default-features = false, features = ["clock"] }
|
||||
clap = { version = "4.5", features = ["env", "cargo"] }
|
||||
clap = { version = "4.5", features = ["cargo", "env"] }
|
||||
crossbeam-channel = "0.5"
|
||||
crossterm = { version = "0.28", features = ["serde"] }
|
||||
dirs = "6.0"
|
||||
|
|
@ -59,8 +59,8 @@ notify-debouncer-mini = "0.7"
|
|||
once_cell = "1"
|
||||
parking_lot_core = "0.9"
|
||||
ratatui = { version = "0.29", default-features = false, features = [
|
||||
'crossterm',
|
||||
'serde',
|
||||
"crossterm",
|
||||
"serde",
|
||||
] }
|
||||
rayon-core = "1.13"
|
||||
ron = "0.12"
|
||||
|
|
@ -71,11 +71,11 @@ shellexpand = "3.1"
|
|||
simplelog = { version = "0.12", default-features = false }
|
||||
struct-patch = "0.10"
|
||||
syntect = { version = "5.3", default-features = false, features = [
|
||||
"parsing",
|
||||
"default-syntaxes",
|
||||
"default-themes",
|
||||
"plist-load",
|
||||
"html",
|
||||
"default-syntaxes",
|
||||
"default-themes",
|
||||
"html",
|
||||
"parsing",
|
||||
"plist-load",
|
||||
] }
|
||||
tui-textarea = "0.7"
|
||||
two-face = { version = "0.4.4", default-features = false }
|
||||
|
|
@ -95,14 +95,14 @@ tempfile = "3"
|
|||
[badges]
|
||||
maintenance = { status = "actively-developed" }
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
opt-level = 'z' # Optimize for size.
|
||||
codegen-units = 1
|
||||
strip = "debuginfo"
|
||||
|
||||
# make debug build as fast as release
|
||||
# usage of utf8 encoding inside tui
|
||||
# makes their debug profile slow
|
||||
[profile.dev.package."ratatui"]
|
||||
opt-level = 3
|
||||
|
||||
[profile.release]
|
||||
opt-level = "z" # Optimize for size.
|
||||
strip = "debuginfo"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ see [NIGHTLIES.md](./NIGHTLIES.md)
|
|||
|
||||
### Requirements
|
||||
|
||||
- Minimum supported `rust`/`cargo` version: `1.82`
|
||||
- Minimum supported `rust`/`cargo` version: `1.88`
|
||||
- See [Install Rust](https://www.rust-lang.org/tools/install)
|
||||
|
||||
- To build openssl dependency (see https://docs.rs/openssl/latest/openssl/)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ impl NewFromOldContent {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn skip_old_line(&mut self) {
|
||||
const fn skip_old_line(&mut self) {
|
||||
self.old_index += 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ impl FileTreeItems {
|
|||
}
|
||||
|
||||
/// how many individual items (files/paths) are in the list
|
||||
pub fn len(&self) -> usize {
|
||||
pub const fn len(&self) -> usize {
|
||||
self.tree_items.len()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,11 +70,11 @@ impl TreeItemInfo {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn unindent(&mut self) {
|
||||
pub const fn unindent(&mut self) {
|
||||
self.indent = self.indent.saturating_sub(1);
|
||||
}
|
||||
|
||||
pub fn set_visible(&mut self, visible: bool) {
|
||||
pub const fn set_visible(&mut self, visible: bool) {
|
||||
self.visible = visible;
|
||||
}
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ impl FileTreeItem {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn info_mut(&mut self) -> &mut TreeItemInfo {
|
||||
pub const fn info_mut(&mut self) -> &mut TreeItemInfo {
|
||||
&mut self.info
|
||||
}
|
||||
|
||||
|
|
@ -176,12 +176,12 @@ impl FileTreeItem {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn hide(&mut self) {
|
||||
pub const fn hide(&mut self) {
|
||||
self.info.visible = false;
|
||||
}
|
||||
|
||||
///
|
||||
pub fn show(&mut self) {
|
||||
pub const fn show(&mut self) {
|
||||
self.info.visible = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1097,7 +1097,7 @@ impl App {
|
|||
Err(e) => {
|
||||
log::error!("delete remote: {e:?}");
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("delete remote error:\n{e}",),
|
||||
format!("delete remote error:\n{e}"),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ impl CommandBar {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn toggle_more(&mut self) {
|
||||
pub const fn toggle_more(&mut self) {
|
||||
if self.expandable {
|
||||
self.expanded = !self.expanded;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ impl ChangesComponent {
|
|||
}
|
||||
|
||||
/// returns true if list is empty
|
||||
pub fn is_empty(&self) -> bool {
|
||||
pub const fn is_empty(&self) -> bool {
|
||||
self.files.is_empty()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ impl CommitList {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn marked_count(&self) -> usize {
|
||||
pub const fn marked_count(&self) -> usize {
|
||||
self.marked.len()
|
||||
}
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ impl CommitList {
|
|||
}
|
||||
|
||||
/// will return view size or None before the first render
|
||||
fn current_size(&self) -> Option<(u16, u16)> {
|
||||
const fn current_size(&self) -> Option<(u16, u16)> {
|
||||
self.current_size.get()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ impl StatusTreeComponent {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_commit(&mut self, revision: Option<CommitId>) {
|
||||
pub const fn set_commit(&mut self, revision: Option<CommitId>) {
|
||||
self.revision = revision;
|
||||
}
|
||||
|
||||
|
|
@ -92,12 +92,12 @@ impl StatusTreeComponent {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn show_selection(&mut self, show: bool) {
|
||||
pub const fn show_selection(&mut self, show: bool) {
|
||||
self.show_selection = show;
|
||||
}
|
||||
|
||||
/// returns true if list is empty
|
||||
pub fn is_empty(&self) -> bool {
|
||||
pub const fn is_empty(&self) -> bool {
|
||||
self.tree.is_empty()
|
||||
}
|
||||
|
||||
|
|
@ -208,7 +208,7 @@ impl StatusTreeComponent {
|
|||
w = width as usize
|
||||
)
|
||||
} else {
|
||||
format!(" {indent_str}{collapse_char}{string}",)
|
||||
format!(" {indent_str}{collapse_char}{string}")
|
||||
};
|
||||
|
||||
Some(Span::styled(
|
||||
|
|
|
|||
|
|
@ -122,17 +122,17 @@ impl TextInputComponent {
|
|||
}
|
||||
|
||||
/// screen area (last time we got drawn)
|
||||
pub fn get_area(&self) -> Rect {
|
||||
pub const fn get_area(&self) -> Rect {
|
||||
self.current_area.get()
|
||||
}
|
||||
|
||||
/// embed into parent draw area
|
||||
pub fn embed(&mut self) {
|
||||
pub const fn embed(&mut self) {
|
||||
self.embed = true;
|
||||
}
|
||||
|
||||
///
|
||||
pub fn enabled(&mut self, enable: bool) {
|
||||
pub const fn enabled(&mut self, enable: bool) {
|
||||
self.selected = Some(enable);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ impl FileTreeItems {
|
|||
}
|
||||
|
||||
///
|
||||
pub(crate) fn len(&self) -> usize {
|
||||
pub(crate) const fn len(&self) -> usize {
|
||||
self.items.len()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ impl HorizontalScroll {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_right(&self) -> usize {
|
||||
pub const fn get_right(&self) -> usize {
|
||||
self.right.get()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ impl VerticalScroll {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_top(&self) -> usize {
|
||||
pub const fn get_top(&self) -> usize {
|
||||
self.top.get()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ impl StatusTree {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn is_empty(&self) -> bool {
|
||||
pub const fn is_empty(&self) -> bool {
|
||||
self.tree.items().is_empty()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ impl Options {
|
|||
self.save();
|
||||
}
|
||||
|
||||
pub fn has_commit_msg_history(&self) -> bool {
|
||||
pub const fn has_commit_msg_history(&self) -> bool {
|
||||
!self.data.commit_msgs.is_empty()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ impl BranchListPopup {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn valid_selection(&self) -> bool {
|
||||
const fn valid_selection(&self) -> bool {
|
||||
!self.branches.is_empty()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ impl CheckoutOptionPopup {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn change_kind(&mut self, incr: bool) {
|
||||
const fn change_kind(&mut self, incr: bool) {
|
||||
self.option = if incr {
|
||||
self.option.next()
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -336,6 +336,7 @@ impl CommitPopup {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn signoff_commit(&mut self) {
|
||||
let msg = self.input.get_text();
|
||||
let signed_msg = self.add_sign_off(msg);
|
||||
|
|
@ -343,7 +344,8 @@ impl CommitPopup {
|
|||
self.input.set_text(signed_msg);
|
||||
}
|
||||
}
|
||||
fn toggle_verify(&mut self) {
|
||||
|
||||
const fn toggle_verify(&mut self) {
|
||||
self.verify = !self.verify;
|
||||
}
|
||||
|
||||
|
|
@ -446,7 +448,7 @@ impl CommitPopup {
|
|||
msg_source,
|
||||
&mut msg,
|
||||
)? {
|
||||
log::error!("prepare-commit-msg hook rejection: {e}",);
|
||||
log::error!("prepare-commit-msg hook rejection: {e}");
|
||||
}
|
||||
self.input.set_text(msg);
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ impl CreateBranchPopup {
|
|||
Err(e) => {
|
||||
log::error!("create branch: {e}");
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("create branch error:\n{e}",),
|
||||
format!("create branch error:\n{e}"),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ impl CreateRemotePopup {
|
|||
Err(e) => {
|
||||
log::error!("create remote: {e}");
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("create remote error:\n{e}",),
|
||||
format!("create remote error:\n{e}"),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ impl GotoLinePopup {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn open(&mut self, max_line: usize) {
|
||||
pub const fn open(&mut self, max_line: usize) {
|
||||
self.visible = true;
|
||||
self.max_line = max_line;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ impl LogSearchPopupPopup {
|
|||
),
|
||||
)]),
|
||||
Line::from(vec![Span::styled(
|
||||
format!("[{x_summary}] summary",),
|
||||
format!("[{x_summary}] summary"),
|
||||
self.theme.text(
|
||||
matches!(
|
||||
self.selection,
|
||||
|
|
@ -235,7 +235,7 @@ impl LogSearchPopupPopup {
|
|||
),
|
||||
)]),
|
||||
Line::from(vec![Span::styled(
|
||||
format!("[{x_body}] message body",),
|
||||
format!("[{x_body}] message body"),
|
||||
self.theme.text(
|
||||
matches!(
|
||||
self.selection,
|
||||
|
|
@ -245,7 +245,7 @@ impl LogSearchPopupPopup {
|
|||
),
|
||||
)]),
|
||||
Line::from(vec![Span::styled(
|
||||
format!("[{x_files}] committed files",),
|
||||
format!("[{x_files}] committed files"),
|
||||
self.theme.text(
|
||||
matches!(
|
||||
self.selection,
|
||||
|
|
@ -255,7 +255,7 @@ impl LogSearchPopupPopup {
|
|||
),
|
||||
)]),
|
||||
Line::from(vec![Span::styled(
|
||||
format!("[{x_authors}] authors",),
|
||||
format!("[{x_authors}] authors"),
|
||||
self.theme.text(
|
||||
matches!(
|
||||
self.selection,
|
||||
|
|
@ -315,7 +315,7 @@ impl LogSearchPopupPopup {
|
|||
}
|
||||
}
|
||||
|
||||
fn move_selection(&mut self, arg: bool) {
|
||||
const fn move_selection(&mut self, arg: bool) {
|
||||
if arg {
|
||||
//up
|
||||
self.selection = match self.selection {
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ impl OptionsPopup {
|
|||
]));
|
||||
}
|
||||
|
||||
fn move_selection(&mut self, up: bool) {
|
||||
const fn move_selection(&mut self, up: bool) {
|
||||
if up {
|
||||
self.selection = match self.selection {
|
||||
AppOption::StatusShowUntracked => {
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ impl RemoteListPopup {
|
|||
Ok(true)
|
||||
}
|
||||
|
||||
fn valid_selection(&self) -> bool {
|
||||
const fn valid_selection(&self) -> bool {
|
||||
!self.remote_names.is_empty()
|
||||
&& self.remote_names.len() >= self.selection as usize
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ impl RenameBranchPopup {
|
|||
Err(e) => {
|
||||
log::error!("create branch: {e}");
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("rename branch error:\n{e}",),
|
||||
format!("rename branch error:\n{e}"),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ impl RenameRemotePopup {
|
|||
Err(e) => {
|
||||
log::error!("rename remote: {e}");
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("rename remote error:\n{e}",),
|
||||
format!("rename remote error:\n{e}"),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ impl ResetPopup {
|
|||
self.hide();
|
||||
}
|
||||
|
||||
fn change_kind(&mut self, incr: bool) {
|
||||
const fn change_kind(&mut self, incr: bool) {
|
||||
self.kind = if incr {
|
||||
match self.kind {
|
||||
ResetType::Soft => ResetType::Mixed,
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ impl StashMsgPopup {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn options(&mut self, options: StashingOptions) {
|
||||
pub const fn options(&mut self, options: StashingOptions) {
|
||||
self.options = options;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ impl TagCommitPopup {
|
|||
|
||||
log::error!("e: {e}");
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("tag error:\n{e}",),
|
||||
format!("tag error:\n{e}"),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ impl UpdateRemoteUrlPopup {
|
|||
Err(e) => {
|
||||
log::error!("update remote url: {e}");
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("update remote url error:\n{e}",),
|
||||
format!("update remote url error:\n{e}"),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ impl Spinner {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn set_state(&mut self, active: bool) {
|
||||
pub const fn set_state(&mut self, active: bool) {
|
||||
self.active = active;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ impl StashList {
|
|||
}
|
||||
Err(e) => {
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("stash apply error:\n{e}",),
|
||||
format!("stash apply error:\n{e}"),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,10 @@ impl<'a, 'b> LineTruncator<'a, 'b> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_horizontal_offset(&mut self, horizontal_offset: u16) {
|
||||
pub const fn set_horizontal_offset(
|
||||
&mut self,
|
||||
horizontal_offset: u16,
|
||||
) {
|
||||
self.horizontal_offset = horizontal_offset;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ impl ParagraphState {
|
|||
self.scroll
|
||||
}
|
||||
|
||||
pub fn set_scroll(&mut self, scroll: ScrollPos) {
|
||||
pub const fn set_scroll(&mut self, scroll: ScrollPos) {
|
||||
self.scroll = scroll;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue