Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
msrv = "1.82.0"
msrv = "1.88.0"
cognitive-complexity-threshold = 18
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
32 changes: 16 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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 }
Expand All @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
2 changes: 1 addition & 1 deletion asyncgit/src/sync/staging/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl NewFromOldContent {
Ok(())
}

fn skip_old_line(&mut self) {
const fn skip_old_line(&mut self) {
self.old_index += 1;
}

Expand Down
2 changes: 1 addition & 1 deletion filetreelist/src/filetreeitems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
10 changes: 5 additions & 5 deletions filetreelist/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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
}

Expand All @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"),
));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/cmdbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/commitlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl CommitList {
}

///
pub fn marked_count(&self) -> usize {
pub const fn marked_count(&self) -> usize {
self.marked.len()
}

Expand Down Expand Up @@ -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()
}

Expand Down
8 changes: 4 additions & 4 deletions src/components/status_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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()
}

Expand Down Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions src/components/textinput.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/utils/filetree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl FileTreeItems {
}

///
pub(crate) fn len(&self) -> usize {
pub(crate) const fn len(&self) -> usize {
self.items.len()
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/utils/scroll_horizontal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl HorizontalScroll {
}
}

pub fn get_right(&self) -> usize {
pub const fn get_right(&self) -> usize {
self.right.get()
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/utils/scroll_vertical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl VerticalScroll {
}
}

pub fn get_top(&self) -> usize {
pub const fn get_top(&self) -> usize {
self.top.get()
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/utils/statustree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl StatusTree {
}

///
pub fn is_empty(&self) -> bool {
pub const fn is_empty(&self) -> bool {
self.tree.items().is_empty()
}

Expand Down
2 changes: 1 addition & 1 deletion src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
2 changes: 1 addition & 1 deletion src/popups/branchlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ impl BranchListPopup {
Ok(())
}

fn valid_selection(&self) -> bool {
const fn valid_selection(&self) -> bool {
!self.branches.is_empty()
}

Expand Down
2 changes: 1 addition & 1 deletion src/popups/checkout_option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 4 additions & 2 deletions src/popups/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,16 @@ impl CommitPopup {

Ok(())
}

fn signoff_commit(&mut self) {
let msg = self.input.get_text();
let signed_msg = self.add_sign_off(msg);
if let std::result::Result::Ok(signed_msg) = signed_msg {
self.input.set_text(signed_msg);
}
}
fn toggle_verify(&mut self) {

const fn toggle_verify(&mut self) {
self.verify = !self.verify;
}

Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/popups/create_branch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"),
));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/popups/create_remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"),
));
}
}
Expand Down
Loading
Loading