From 0c1bd8fba087419cac4b72151a6840735b3789cc Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 01:34:50 -0800 Subject: [PATCH 01/11] cargo fmt --- build.rs | 2 +- src/application.rs | 8 ++++---- src/config/git_config.rs | 4 ++-- src/config/key_bindings.rs | 2 +- src/config/theme.rs | 2 +- src/config/utils/get_bool.rs | 2 +- src/config/utils/get_diff_ignore_whitespace.rs | 2 +- src/config/utils/get_diff_rename.rs | 2 +- src/config/utils/get_diff_show_whitespace.rs | 2 +- src/config/utils/get_input.rs | 2 +- src/config/utils/get_unsigned_integer.rs | 2 +- src/display/crossterm.rs | 16 ++++++++-------- src/display/utils.rs | 2 +- src/git/commit.rs | 4 ++-- src/git/commit_diff_loader.rs | 2 +- src/git/reference_kind.rs | 2 +- src/input.rs | 4 ++-- src/input/event_provider.rs | 4 ++-- src/input/key_bindings.rs | 2 +- src/input/thread/state.rs | 2 +- src/module/module_handler.rs | 4 ++-- src/modules/external_editor.rs | 2 +- src/modules/list.rs | 2 +- src/modules/list/search.rs | 2 +- src/modules/show_commit.rs | 2 +- src/process.rs | 4 ++-- src/process/tests.rs | 4 ++-- src/runtime/installer.rs | 2 +- src/runtime/runtime.rs | 2 +- src/search/state.rs | 2 +- src/test_helpers.rs | 12 ++++++------ src/test_helpers/assertions.rs | 2 +- .../assert_rendered_output/render_view_data.rs | 2 +- .../assert_rendered_output/render_view_line.rs | 2 +- .../create_default_test_module_handler.rs | 2 +- src/test_helpers/create_test_keybindings.rs | 2 +- src/test_helpers/testers.rs | 4 ++-- src/test_helpers/testers/module.rs | 4 ++-- src/test_helpers/testers/process.rs | 6 +++--- src/test_helpers/testers/threadable.rs | 4 ++-- src/test_helpers/with_git_directory.rs | 2 +- src/todo_file.rs | 2 +- src/view.rs | 2 +- src/view/render_slice/tests.rs | 2 +- src/view/thread/state.rs | 2 +- 45 files changed, 72 insertions(+), 72 deletions(-) diff --git a/build.rs b/build.rs index 9f5dd27b0..1a06ea43f 100644 --- a/build.rs +++ b/build.rs @@ -1,7 +1,7 @@ use std::{env, process}; use chrono::{TimeZone, Utc}; -use rustc_version::{version_meta, Channel}; +use rustc_version::{Channel, version_meta}; fn main() { println!("cargo::rustc-check-cfg=cfg(allow_unknown_lints)"); diff --git a/src/application.rs b/src/application.rs index 82aeab826..77c6be1a4 100644 --- a/src/application.rs +++ b/src/application.rs @@ -4,6 +4,8 @@ use anyhow::Result; use parking_lot::Mutex; use crate::{ + Args, + Exit, config::Config, display::Display, git::Repository, @@ -15,8 +17,6 @@ use crate::{ search, todo_file::{TodoFile, TodoFileOptions}, view::View, - Args, - Exit, }; pub(crate) struct Application @@ -198,12 +198,12 @@ mod tests { module::Modules, runtime::{Installer, RuntimeError}, test_helpers::{ + DefaultTestModule, + TestModuleProvider, create_config, create_event_reader, mocks, with_git_directory, - DefaultTestModule, - TestModuleProvider, }, }; diff --git a/src/config/git_config.rs b/src/config/git_config.rs index 6ce8c4bf4..c398db6a7 100644 --- a/src/config/git_config.rs +++ b/src/config/git_config.rs @@ -2,8 +2,8 @@ use std::env; use crate::{ config::{ - utils::{get_string, get_unsigned_integer, git_diff_renames}, ConfigError, + utils::{get_string, get_unsigned_integer, git_diff_renames}, }, git::Config, }; @@ -92,7 +92,7 @@ mod tests { use super::*; use crate::{ config::ConfigErrorCause, - test_helpers::{invalid_utf, with_env_var, with_git_config, EnvVarAction}, + test_helpers::{EnvVarAction, invalid_utf, with_env_var, with_git_config}, }; macro_rules! config_test { diff --git a/src/config/key_bindings.rs b/src/config/key_bindings.rs index b81b235cd..4fd52b0f5 100644 --- a/src/config/key_bindings.rs +++ b/src/config/key_bindings.rs @@ -1,5 +1,5 @@ use crate::{ - config::{utils::get_input, ConfigError}, + config::{ConfigError, utils::get_input}, git::Config, }; diff --git a/src/config/theme.rs b/src/config/theme.rs index 3310aa443..cc8369377 100644 --- a/src/config/theme.rs +++ b/src/config/theme.rs @@ -1,9 +1,9 @@ use crate::{ config::{ - utils::{get_optional_string, get_string}, Color, ConfigError, ConfigErrorCause, + utils::{get_optional_string, get_string}, }, git::Config, }; diff --git a/src/config/utils/get_bool.rs b/src/config/utils/get_bool.rs index c8fa96b0f..f95a0d1fc 100644 --- a/src/config/utils/get_bool.rs +++ b/src/config/utils/get_bool.rs @@ -1,5 +1,5 @@ use crate::{ - config::{utils::get_optional_string, ConfigError, ConfigErrorCause}, + config::{ConfigError, ConfigErrorCause, utils::get_optional_string}, git::{Config, ErrorCode}, }; diff --git a/src/config/utils/get_diff_ignore_whitespace.rs b/src/config/utils/get_diff_ignore_whitespace.rs index 4f5796f8d..ea713ce37 100644 --- a/src/config/utils/get_diff_ignore_whitespace.rs +++ b/src/config/utils/get_diff_ignore_whitespace.rs @@ -1,5 +1,5 @@ use crate::{ - config::{utils::get_string, ConfigError, ConfigErrorCause, DiffIgnoreWhitespaceSetting}, + config::{ConfigError, ConfigErrorCause, DiffIgnoreWhitespaceSetting, utils::get_string}, git::Config, }; diff --git a/src/config/utils/get_diff_rename.rs b/src/config/utils/get_diff_rename.rs index e49250258..723d4d6b9 100644 --- a/src/config/utils/get_diff_rename.rs +++ b/src/config/utils/get_diff_rename.rs @@ -1,5 +1,5 @@ use crate::{ - config::{get_string, ConfigError, ConfigErrorCause}, + config::{ConfigError, ConfigErrorCause, get_string}, git::Config, }; diff --git a/src/config/utils/get_diff_show_whitespace.rs b/src/config/utils/get_diff_show_whitespace.rs index 95bea4d5d..b3ac69128 100644 --- a/src/config/utils/get_diff_show_whitespace.rs +++ b/src/config/utils/get_diff_show_whitespace.rs @@ -1,5 +1,5 @@ use crate::{ - config::{get_string, ConfigError, ConfigErrorCause, DiffShowWhitespaceSetting}, + config::{ConfigError, ConfigErrorCause, DiffShowWhitespaceSetting, get_string}, git::Config, }; diff --git a/src/config/utils/get_input.rs b/src/config/utils/get_input.rs index bc38e82c8..9aca48893 100644 --- a/src/config/utils/get_input.rs +++ b/src/config/utils/get_input.rs @@ -1,5 +1,5 @@ use crate::{ - config::{utils::get_string, ConfigError, ConfigErrorCause}, + config::{ConfigError, ConfigErrorCause, utils::get_string}, git::Config, }; diff --git a/src/config/utils/get_unsigned_integer.rs b/src/config/utils/get_unsigned_integer.rs index 247789406..454cf0eff 100644 --- a/src/config/utils/get_unsigned_integer.rs +++ b/src/config/utils/get_unsigned_integer.rs @@ -1,5 +1,5 @@ use crate::{ - config::{utils::get_optional_string, ConfigError, ConfigErrorCause}, + config::{ConfigError, ConfigErrorCause, utils::get_optional_string}, git::{Config, ErrorCode}, }; diff --git a/src/display/crossterm.rs b/src/display/crossterm.rs index cb3e5c6af..832415697 100644 --- a/src/display/crossterm.rs +++ b/src/display/crossterm.rs @@ -1,7 +1,9 @@ #![cfg(not(tarpaulin_include))] -use std::io::{stdout, BufWriter, Stdout, Write}; +use std::io::{BufWriter, Stdout, Write, stdout}; use crossterm::{ + Command, + QueueableCommand, cursor::{Hide, MoveTo, MoveToColumn, MoveToNextLine, Show}, event::{ DisableMouseCapture, @@ -10,23 +12,21 @@ use crossterm::{ PopKeyboardEnhancementFlags, PushKeyboardEnhancementFlags, }, - style::{available_color_count, Attribute, Colors, Print, ResetColor, SetAttribute, SetColors}, + style::{Attribute, Colors, Print, ResetColor, SetAttribute, SetColors, available_color_count}, terminal::{ - disable_raw_mode, - enable_raw_mode, - size, Clear, ClearType, DisableLineWrap, EnableLineWrap, EnterAlternateScreen, LeaveAlternateScreen, + disable_raw_mode, + enable_raw_mode, + size, }, - Command, - QueueableCommand, }; -use crate::display::{utils::detect_color_mode, ColorMode, DisplayError, Size, Tui}; +use crate::display::{ColorMode, DisplayError, Size, Tui, utils::detect_color_mode}; /// A thin wrapper over the [Crossterm library](https://github.com/crossterm-rs/crossterm). #[derive(Debug)] diff --git a/src/display/utils.rs b/src/display/utils.rs index e54b2dc01..3e65e3f0b 100644 --- a/src/display/utils.rs +++ b/src/display/utils.rs @@ -201,7 +201,7 @@ mod tests { use rstest::rstest; use super::*; - use crate::test_helpers::{with_env_var, EnvVarAction}; + use crate::test_helpers::{EnvVarAction, with_env_var}; #[test] fn detect_color_mode_no_env_2_colors() { diff --git a/src/git/commit.rs b/src/git/commit.rs index f55874bb8..8116a1f09 100644 --- a/src/git/commit.rs +++ b/src/git/commit.rs @@ -121,11 +121,11 @@ mod tests { use super::*; use crate::test_helpers::{ + CreateCommitOptions, + JAN_2021_EPOCH, builders::{CommitBuilder, ReferenceBuilder}, create_commit, with_temp_repository, - CreateCommitOptions, - JAN_2021_EPOCH, }; #[test] diff --git a/src/git/commit_diff_loader.rs b/src/git/commit_diff_loader.rs index d0b8a2515..6c10100b0 100644 --- a/src/git/commit_diff_loader.rs +++ b/src/git/commit_diff_loader.rs @@ -159,7 +159,7 @@ impl<'options> CommitDiffLoader<'options> { #[cfg(all(unix, test))] mod tests { use std::{ - fs::{remove_file, File}, + fs::{File, remove_file}, io::Write, os::unix::fs::symlink, }; diff --git a/src/git/reference_kind.rs b/src/git/reference_kind.rs index db2953641..14360f117 100644 --- a/src/git/reference_kind.rs +++ b/src/git/reference_kind.rs @@ -37,7 +37,7 @@ impl ReferenceKind { #[cfg(test)] mod tests { use super::*; - use crate::test_helpers::{with_temp_repository, JAN_2021_EPOCH}; + use crate::test_helpers::{JAN_2021_EPOCH, with_temp_repository}; #[test] fn from_git2_reference_branch() { diff --git a/src/input.rs b/src/input.rs index 38663c7e9..c298af695 100644 --- a/src/input.rs +++ b/src/input.rs @@ -23,11 +23,11 @@ pub(crate) use crossterm::event::{KeyCode, KeyEventKind, KeyModifiers, MouseEven pub(crate) use self::{ event::Event, event_handler::EventHandler, - event_provider::{read_event, EventReaderFn}, + event_provider::{EventReaderFn, read_event}, input_options::InputOptions, key_bindings::KeyBindings, key_event::KeyEvent, map_keybindings::map_keybindings, standard_event::StandardEvent, - thread::{State, Thread, THREAD_NAME}, + thread::{State, THREAD_NAME, Thread}, }; diff --git a/src/input/event_provider.rs b/src/input/event_provider.rs index e6743a7e2..c005aaaa3 100644 --- a/src/input/event_provider.rs +++ b/src/input/event_provider.rs @@ -1,9 +1,9 @@ use std::time::Duration; -use anyhow::{anyhow, Result}; +use anyhow::{Result, anyhow}; +use crossterm::event::{Event, KeyEvent}; #[cfg(not(test))] use crossterm::event::{poll, read}; -use crossterm::event::{Event, KeyEvent}; #[cfg(test)] use read_event_mocks::{poll, read}; diff --git a/src/input/key_bindings.rs b/src/input/key_bindings.rs index 550c82d5d..c09d0ef48 100644 --- a/src/input/key_bindings.rs +++ b/src/input/key_bindings.rs @@ -1,4 +1,4 @@ -use crate::input::{map_keybindings, Event}; +use crate::input::{Event, map_keybindings}; /// Represents a mapping between an input event and an action. #[derive(Debug)] diff --git a/src/input/thread/state.rs b/src/input/thread/state.rs index 57c039596..0a482ecea 100644 --- a/src/input/thread/state.rs +++ b/src/input/thread/state.rs @@ -2,8 +2,8 @@ use std::{ collections::VecDeque, mem, sync::{ - atomic::{AtomicBool, Ordering}, Arc, + atomic::{AtomicBool, Ordering}, }, time::Duration, }; diff --git a/src/module/module_handler.rs b/src/module/module_handler.rs index 2dd33e970..1e48eed22 100644 --- a/src/module/module_handler.rs +++ b/src/module/module_handler.rs @@ -66,14 +66,14 @@ impl ModuleHandler(repo: &str, callback: C) where C: FnOnce(&str) { diff --git a/src/todo_file.rs b/src/todo_file.rs index a76001c50..1091c38d3 100644 --- a/src/todo_file.rs +++ b/src/todo_file.rs @@ -13,7 +13,7 @@ mod todo_file_options; mod utils; use std::{ - fs::{read_to_string, File}, + fs::{File, read_to_string}, io::Write, path::{Path, PathBuf}, slice::Iter, diff --git a/src/view.rs b/src/view.rs index fba424087..d1716df26 100644 --- a/src/view.rs +++ b/src/view.rs @@ -31,7 +31,7 @@ pub(crate) use self::{ render_context::RenderContext, render_slice::RenderSlice, scroll_position::ScrollPosition, - thread::{State, Thread, ViewAction, REFRESH_THREAD_NAME}, + thread::{REFRESH_THREAD_NAME, State, Thread, ViewAction}, view_data::ViewData, view_data_updater::ViewDataUpdater, view_line::ViewLine, diff --git a/src/view/render_slice/tests.rs b/src/view/render_slice/tests.rs index d58553272..0b8ced204 100644 --- a/src/view/render_slice/tests.rs +++ b/src/view/render_slice/tests.rs @@ -3,10 +3,10 @@ use crate::{ display::DisplayColor, test_helpers::assertions::assert_rendered_output::{ _assert_rendered_output, - render_view_line, AssertRenderOptions, ExactPattern, LinePattern, + render_view_line, }, view::LineSegmentOptions, }; diff --git a/src/view/thread/state.rs b/src/view/thread/state.rs index bdbf35ecc..be4157fc2 100644 --- a/src/view/thread/state.rs +++ b/src/view/thread/state.rs @@ -1,8 +1,8 @@ use std::{ borrow::BorrowMut, sync::{ - atomic::{AtomicBool, Ordering}, Arc, + atomic::{AtomicBool, Ordering}, }, }; From 69578892b2fecf36fddcd1e1fa34d75286337b62 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 01:20:43 -0800 Subject: [PATCH 02/11] Disable compiler warning for Rust 2021 expr fragment specifiers A manual audit of the existing expr specifiers didn't turn up any problems with just switching to the 2024 semantics. https://doc.rust-lang.org/nightly/edition-guide/rust-2024/macro-fragment-specifiers.html --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index cf5c69e3b..41078a117 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,6 +117,7 @@ unexpected_cfgs = { level = "warn", check-cfg = ["cfg(tarpaulin_include)"] } # absolute_paths_not_starting_with_crate - group rust_2018_compatibility # box-pointers - used in project, and is safe to do so deprecated_in_future = "warn" +edition_2024_expr_fragment_specifier = "allow" # elided_lifetimes_in_paths - group: rust_2018_idioms # explicit_outlives_requirements - group: rust_2018_idioms ffi_unwind_calls = "warn" From 1bfb56987ca2c223d5b1fdb32f1c7e1814cb9fc0 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 12:33:43 -0800 Subject: [PATCH 03/11] Set minimum Rust version to 1.77.0 Inform Clippy of our minimum supported Rust version, so it won't advise us to use #[expect] (which is too new). We don't support older Rust because of cargo:: syntax in build.rs: error: the `cargo::` syntax for build script output instructions was added in Rust 1.77.0, but the minimum supported Rust version of `git-interactive-rebase-tool v2.4.1 (/home/bgilbert/sw/git-interactive-rebase-tool)` is 1.56.0. Switch to the old `cargo:rustc-check-cfg=cfg(allow_unknown_lints)` syntax (note the single colon). See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script for more information about build script outputs. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 41078a117..458c5fe68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ include = [ "/test" ] edition = "2021" +rust-version = "1.77.0" [[bin]] name = "interactive-rebase-tool" From 9689872384fae6bb270832aff006f224b211a479 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 12:21:32 -0800 Subject: [PATCH 04/11] Make pub(crate) fields of pub(crate) structs public This doesn't change whether the fields are accessible outside the crate, and avoids clippy warnings: warning: scoped visibility modifier on a field --> src/input/key_bindings.rs:44:2 | 44 | pub(crate) action_drop: Vec, | ^^^^^^^^^^ | = help: consider making the field private and adding a scoped visibility method for it = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_scoped_visibility_modifiers --- src/config.rs | 24 +++---- src/config/git_config.rs | 14 ++-- src/config/key_bindings.rs | 92 +++++++++++++------------- src/config/theme.rs | 44 ++++++------ src/git/commit.rs | 16 ++--- src/git/commit_diff_loader_options.rs | 16 ++--- src/input/key_bindings.rs | 90 ++++++++++++------------- src/input/key_event.rs | 4 +- src/modules/list/tests/search.rs | 2 +- src/process/results.rs | 2 +- src/test_helpers/testers/module.rs | 7 +- src/test_helpers/testers/process.rs | 10 +-- src/test_helpers/with_event_handler.rs | 6 +- src/test_helpers/with_search.rs | 2 +- src/test_helpers/with_view_state.rs | 2 +- src/todo_file/history/history_item.rs | 8 +-- src/todo_file/todo_file_options.rs | 6 +- src/view/thread/state.rs | 3 +- 18 files changed, 175 insertions(+), 173 deletions(-) diff --git a/src/config.rs b/src/config.rs index fd32bbd25..7d6202592 100644 --- a/src/config.rs +++ b/src/config.rs @@ -41,29 +41,29 @@ const DEFAULT_TAB_SYMBOL: &str = "\u{2192}"; // → #[non_exhaustive] pub(crate) struct Config { /// If to select the next line in the list after performing an action. - pub(crate) auto_select_next: bool, + pub auto_select_next: bool, /// How to handle whitespace when calculating diffs. - pub(crate) diff_ignore_whitespace: DiffIgnoreWhitespaceSetting, + pub diff_ignore_whitespace: DiffIgnoreWhitespaceSetting, /// If to ignore blank lines when calculating diffs. - pub(crate) diff_ignore_blank_lines: bool, + pub diff_ignore_blank_lines: bool, /// How to show whitespace in diffs. - pub(crate) diff_show_whitespace: DiffShowWhitespaceSetting, + pub diff_show_whitespace: DiffShowWhitespaceSetting, /// The symbol used to replace space characters. - pub(crate) diff_space_symbol: String, + pub diff_space_symbol: String, /// The symbol used to replace tab characters. - pub(crate) diff_tab_symbol: String, + pub diff_tab_symbol: String, /// The display width of the tab character. - pub(crate) diff_tab_width: u32, + pub diff_tab_width: u32, /// If set, automatically add an exec line with the command after every modified line - pub(crate) post_modified_line_exec_command: Option, + pub post_modified_line_exec_command: Option, /// The maximum number of undo steps. - pub(crate) undo_limit: u32, + pub undo_limit: u32, /// Configuration options loaded directly from Git. - pub(crate) git: GitConfig, + pub git: GitConfig, /// Key binding configuration. - pub(crate) key_bindings: KeyBindings, + pub key_bindings: KeyBindings, /// Theme configuration. - pub(crate) theme: Theme, + pub theme: Theme, } impl Config { diff --git a/src/config/git_config.rs b/src/config/git_config.rs index c398db6a7..e40a2c9fe 100644 --- a/src/config/git_config.rs +++ b/src/config/git_config.rs @@ -28,31 +28,31 @@ pub(crate) struct GitConfig { /// The Git comment character, from [`core.commentChar`]( /// https://git-scm.com/docs/git-config#Documentation/git-config.txt-corecommentChar /// ). - pub(crate) comment_char: String, + pub comment_char: String, /// Number of context lines, from [`diff.context`]( /// https://git-scm.com/docs/diff-config/#Documentation/diff-config.txt-diffcontext /// ). - pub(crate) diff_context: u32, + pub diff_context: u32, /// Number of interhunk lines, from [`diff.interhunk_lines`]( /// https://git-scm.com/docs/diff-config/#Documentation/diff-config.txt-diffinterHunkContext /// ). - pub(crate) diff_interhunk_lines: u32, + pub diff_interhunk_lines: u32, /// The limit for detecting renames, from [`diff.renameLimit`]( /// https://git-scm.com/docs/diff-config/#Documentation/diff-config.txt-diffrenameLimit /// ). - pub(crate) diff_rename_limit: u32, + pub diff_rename_limit: u32, /// If to detect renames, from [`diff.renames`]( /// https://git-scm.com/docs/diff-config/#Documentation/diff-config.txt-diffrenames /// ). - pub(crate) diff_renames: bool, + pub diff_renames: bool, /// If to detect copies, from [`diff.renames`]( /// https://git-scm.com/docs/diff-config/#Documentation/diff-config.txt-diffrenames /// ). - pub(crate) diff_copies: bool, + pub diff_copies: bool, /// The Git editor, from [`core.editor`]( /// https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreeditor /// ). - pub(crate) editor: String, + pub editor: String, } impl GitConfig { diff --git a/src/config/key_bindings.rs b/src/config/key_bindings.rs index 4fd52b0f5..c084d4391 100644 --- a/src/config/key_bindings.rs +++ b/src/config/key_bindings.rs @@ -17,100 +17,100 @@ fn map_single_ascii_to_lower(s: &str) -> String { #[non_exhaustive] pub(crate) struct KeyBindings { /// Key bindings for aborting. - pub(crate) abort: Vec, + pub abort: Vec, /// Key bindings for the break action. - pub(crate) action_break: Vec, + pub action_break: Vec, /// Key bindings for the drop action. - pub(crate) action_drop: Vec, + pub action_drop: Vec, /// Key bindings for the edit action. - pub(crate) action_edit: Vec, + pub action_edit: Vec, /// Key bindings for the fixup action. - pub(crate) action_fixup: Vec, + pub action_fixup: Vec, /// Key bindings for the pick action. - pub(crate) action_pick: Vec, + pub action_pick: Vec, /// Key bindings for the reword action. - pub(crate) action_reword: Vec, + pub action_reword: Vec, /// Key bindings for the squash action. - pub(crate) action_squash: Vec, + pub action_squash: Vec, /// Key bindings for negative confirmation. - pub(crate) confirm_no: Vec, + pub confirm_no: Vec, /// Key bindings for positive confirmation. - pub(crate) confirm_yes: Vec, + pub confirm_yes: Vec, /// Key bindings for editing. - pub(crate) edit: Vec, + pub edit: Vec, /// Key bindings for forcing a abort. - pub(crate) force_abort: Vec, + pub force_abort: Vec, /// Key bindings for forcing a rebase. - pub(crate) force_rebase: Vec, + pub force_rebase: Vec, /// Key bindings for showing help. - pub(crate) help: Vec, + pub help: Vec, /// Key bindings for inserting a line. - pub(crate) insert_line: Vec, + pub insert_line: Vec, /// Key bindings for moving down. - pub(crate) move_down: Vec, + pub move_down: Vec, /// Key bindings for moving to the end. - pub(crate) move_end: Vec, + pub move_end: Vec, /// Key bindings for moving to the start. - pub(crate) move_home: Vec, + pub move_home: Vec, /// Key bindings for moving to the left. - pub(crate) move_left: Vec, + pub move_left: Vec, /// Key bindings for moving to the right. - pub(crate) move_right: Vec, + pub move_right: Vec, /// Key bindings for moving up. - pub(crate) move_up: Vec, + pub move_up: Vec, /// Key bindings for moving down a step. - pub(crate) move_down_step: Vec, + pub move_down_step: Vec, /// Key bindings for moving up a step. - pub(crate) move_up_step: Vec, + pub move_up_step: Vec, /// Key bindings for moving the selection down. - pub(crate) move_selection_down: Vec, + pub move_selection_down: Vec, /// Key bindings for moving the selection up. - pub(crate) move_selection_up: Vec, + pub move_selection_up: Vec, /// Key bindings for scrolling down. - pub(crate) scroll_down: Vec, + pub scroll_down: Vec, /// Key bindings for scrolling to the end. - pub(crate) scroll_end: Vec, + pub scroll_end: Vec, /// Key bindings for scrolling to the start. - pub(crate) scroll_home: Vec, + pub scroll_home: Vec, /// Key bindings for scrolling to the left. - pub(crate) scroll_left: Vec, + pub scroll_left: Vec, /// Key bindings for scrolling to the right. - pub(crate) scroll_right: Vec, + pub scroll_right: Vec, /// Key bindings for scrolling up. - pub(crate) scroll_up: Vec, + pub scroll_up: Vec, /// Key bindings for scrolling down a step. - pub(crate) scroll_step_down: Vec, + pub scroll_step_down: Vec, /// Key bindings for scrolling up a step. - pub(crate) scroll_step_up: Vec, + pub scroll_step_up: Vec, /// Key bindings for opening the external editor. - pub(crate) open_in_external_editor: Vec, + pub open_in_external_editor: Vec, /// Key bindings for rebasing. - pub(crate) rebase: Vec, + pub rebase: Vec, /// Key bindings for redoing a change. - pub(crate) redo: Vec, + pub redo: Vec, /// Key bindings for removing a line. - pub(crate) remove_line: Vec, + pub remove_line: Vec, /// Key bindings for starting search. - pub(crate) search_start: Vec, + pub search_start: Vec, /// Key bindings for next search match. - pub(crate) search_next: Vec, + pub search_next: Vec, /// Key bindings for previous search match. - pub(crate) search_previous: Vec, + pub search_previous: Vec, /// Key bindings for showing a commit. - pub(crate) show_commit: Vec, + pub show_commit: Vec, /// Key bindings for showing a diff. - pub(crate) show_diff: Vec, + pub show_diff: Vec, /// Key bindings for toggling visual mode. - pub(crate) toggle_visual_mode: Vec, + pub toggle_visual_mode: Vec, /// Key bindings for undoing a change. - pub(crate) undo: Vec, + pub undo: Vec, /// Key bindings for the fixup specific action to toggle the c option. - pub(crate) fixup_keep_message_with_editor: Vec, + pub fixup_keep_message_with_editor: Vec, /// Key bindings for the fixup specific action to toggle the c option. - pub(crate) fixup_keep_message: Vec, + pub fixup_keep_message: Vec, } impl KeyBindings { diff --git a/src/config/theme.rs b/src/config/theme.rs index cc8369377..325062ef6 100644 --- a/src/config/theme.rs +++ b/src/config/theme.rs @@ -28,49 +28,49 @@ fn get_color(config: Option<&Config>, name: &str, default: Color) -> Result, - pub(crate) author: User, - pub(crate) authored_date: Option>, - pub(crate) message: Option, - pub(crate) committer: Option, - pub(crate) committed_date: DateTime, - pub(crate) summary: Option, + pub hash: String, + pub reference: Option, + pub author: User, + pub authored_date: Option>, + pub message: Option, + pub committer: Option, + pub committed_date: DateTime, + pub summary: Option, } impl Commit { diff --git a/src/git/commit_diff_loader_options.rs b/src/git/commit_diff_loader_options.rs index acb1f853c..ec0163d48 100644 --- a/src/git/commit_diff_loader_options.rs +++ b/src/git/commit_diff_loader_options.rs @@ -2,14 +2,14 @@ #[derive(Copy, Clone, Debug)] #[allow(clippy::struct_excessive_bools)] pub(crate) struct CommitDiffLoaderOptions { - pub(crate) context_lines: u32, - pub(crate) copies: bool, - pub(crate) ignore_whitespace: bool, - pub(crate) ignore_whitespace_change: bool, - pub(crate) ignore_blank_lines: bool, - pub(crate) interhunk_context: u32, - pub(crate) rename_limit: u32, - pub(crate) renames: bool, + pub context_lines: u32, + pub copies: bool, + pub ignore_whitespace: bool, + pub ignore_whitespace_change: bool, + pub ignore_blank_lines: bool, + pub interhunk_context: u32, + pub rename_limit: u32, + pub renames: bool, } impl CommitDiffLoaderOptions { diff --git a/src/input/key_bindings.rs b/src/input/key_bindings.rs index c09d0ef48..5c17f4f7d 100644 --- a/src/input/key_bindings.rs +++ b/src/input/key_bindings.rs @@ -5,99 +5,99 @@ use crate::input::{Event, map_keybindings}; #[non_exhaustive] pub(crate) struct KeyBindings { /// Key bindings for redoing a change. - pub(crate) redo: Vec, + pub redo: Vec, /// Key bindings for undoing a change. - pub(crate) undo: Vec, + pub undo: Vec, /// Key bindings for scrolling down. - pub(crate) scroll_down: Vec, + pub scroll_down: Vec, /// Key bindings for scrolling to the end. - pub(crate) scroll_end: Vec, + pub scroll_end: Vec, /// Key bindings for scrolling to the start. - pub(crate) scroll_home: Vec, + pub scroll_home: Vec, /// Key bindings for scrolling to the left. - pub(crate) scroll_left: Vec, + pub scroll_left: Vec, /// Key bindings for scrolling to the right. - pub(crate) scroll_right: Vec, + pub scroll_right: Vec, /// Key bindings for scrolling up. - pub(crate) scroll_up: Vec, + pub scroll_up: Vec, /// Key bindings for scrolling down a step. - pub(crate) scroll_step_down: Vec, + pub scroll_step_down: Vec, /// Key bindings for scrolling up a step. - pub(crate) scroll_step_up: Vec, + pub scroll_step_up: Vec, /// Key bindings for help. - pub(crate) help: Vec, + pub help: Vec, /// Key bindings for starting search. - pub(crate) search_start: Vec, + pub search_start: Vec, /// Key bindings for next search match. - pub(crate) search_next: Vec, + pub search_next: Vec, /// Key bindings for previous search match. - pub(crate) search_previous: Vec, + pub search_previous: Vec, /// Key bindings for aborting. - pub(crate) abort: Vec, + pub abort: Vec, /// Key bindings for the break action. - pub(crate) action_break: Vec, + pub action_break: Vec, /// Key bindings for the drop action. - pub(crate) action_drop: Vec, + pub action_drop: Vec, /// Key bindings for the edit action. - pub(crate) action_edit: Vec, + pub action_edit: Vec, /// Key bindings for the fixup action. - pub(crate) action_fixup: Vec, + pub action_fixup: Vec, /// Key bindings for the pick action. - pub(crate) action_pick: Vec, + pub action_pick: Vec, /// Key bindings for the reword action. - pub(crate) action_reword: Vec, + pub action_reword: Vec, /// Key bindings for the squash action. - pub(crate) action_squash: Vec, + pub action_squash: Vec, /// Key bindings for positive confirmation. - pub(crate) confirm_yes: Vec, + pub confirm_yes: Vec, /// Key bindings for editing. - pub(crate) edit: Vec, + pub edit: Vec, /// Key bindings for forcing an abort. - pub(crate) force_abort: Vec, + pub force_abort: Vec, /// Key bindings for forcing a rebase. - pub(crate) force_rebase: Vec, + pub force_rebase: Vec, /// Key bindings for inserting a line. - pub(crate) insert_line: Vec, + pub insert_line: Vec, /// Key bindings for moving down. - pub(crate) move_down: Vec, + pub move_down: Vec, /// Key bindings for moving down a step. - pub(crate) move_down_step: Vec, + pub move_down_step: Vec, /// Key bindings for moving to the end. - pub(crate) move_end: Vec, + pub move_end: Vec, /// Key bindings for moving to the start. - pub(crate) move_home: Vec, + pub move_home: Vec, /// Key bindings for moving to the left. - pub(crate) move_left: Vec, + pub move_left: Vec, /// Key bindings for moving to the right. - pub(crate) move_right: Vec, + pub move_right: Vec, /// Key bindings for moving the selection down. - pub(crate) move_selection_down: Vec, + pub move_selection_down: Vec, /// Key bindings for moving the selection up. - pub(crate) move_selection_up: Vec, + pub move_selection_up: Vec, /// Key bindings for moving up. - pub(crate) move_up: Vec, + pub move_up: Vec, /// Key bindings for moving up a step. - pub(crate) move_up_step: Vec, + pub move_up_step: Vec, /// Key bindings for opening the external editor. - pub(crate) open_in_external_editor: Vec, + pub open_in_external_editor: Vec, /// Key bindings for rebasing. - pub(crate) rebase: Vec, + pub rebase: Vec, /// Key bindings for removing a line. - pub(crate) remove_line: Vec, + pub remove_line: Vec, /// Key bindings for showing a commit. - pub(crate) show_commit: Vec, + pub show_commit: Vec, /// Key bindings for showing a diff. - pub(crate) show_diff: Vec, + pub show_diff: Vec, /// Key bindings for toggling visual mode. - pub(crate) toggle_visual_mode: Vec, + pub toggle_visual_mode: Vec, /// Key bindings for the fixup specific action to toggle the c option. - pub(crate) fixup_keep_message: Vec, + pub fixup_keep_message: Vec, /// Key biding for the fixup specific action to toggle the C option. - pub(crate) fixup_keep_message_with_editor: Vec, + pub fixup_keep_message_with_editor: Vec, } impl KeyBindings { diff --git a/src/input/key_event.rs b/src/input/key_event.rs index a947e2013..7da6372bf 100644 --- a/src/input/key_event.rs +++ b/src/input/key_event.rs @@ -5,9 +5,9 @@ use crate::input::{KeyCode, KeyModifiers}; #[allow(clippy::exhaustive_structs)] pub(crate) struct KeyEvent { /// The key itself. - pub(crate) code: KeyCode, + pub code: KeyCode, /// Additional key modifiers. - pub(crate) modifiers: KeyModifiers, + pub modifiers: KeyModifiers, } impl KeyEvent { diff --git a/src/modules/list/tests/search.rs b/src/modules/list/tests/search.rs index 8b1fc7bf0..422f9df2d 100644 --- a/src/modules/list/tests/search.rs +++ b/src/modules/list/tests/search.rs @@ -26,7 +26,7 @@ enum Action<'action> { } struct TestContext { - pub(crate) list: List, + list: List, module_test_context: ModuleTestContext, results: Vec, key_bindings: KeyBindings, diff --git a/src/process/results.rs b/src/process/results.rs index a3895311f..929f0055e 100644 --- a/src/process/results.rs +++ b/src/process/results.rs @@ -11,7 +11,7 @@ use crate::{ #[derive(Debug)] pub(crate) struct Results { - pub(crate) artifacts: VecDeque, + pub artifacts: VecDeque, } impl Results { diff --git a/src/test_helpers/testers/module.rs b/src/test_helpers/testers/module.rs index a29b2a835..4e5211857 100644 --- a/src/test_helpers/testers/module.rs +++ b/src/test_helpers/testers/module.rs @@ -15,10 +15,11 @@ use crate::{ view::{RenderContext, ViewData}, }; +#[allow(clippy::partial_pub_fields)] pub(crate) struct ModuleTestContext { - pub(crate) event_handler_context: EventHandlerTestContext, - pub(crate) render_context: RenderContext, - pub(crate) view_context: ViewStateTestContext, + pub event_handler_context: EventHandlerTestContext, + pub render_context: RenderContext, + pub view_context: ViewStateTestContext, todo_file: Option, } diff --git a/src/test_helpers/testers/process.rs b/src/test_helpers/testers/process.rs index e01983623..42e5bbe22 100644 --- a/src/test_helpers/testers/process.rs +++ b/src/test_helpers/testers/process.rs @@ -20,11 +20,11 @@ use crate::{ }; pub(crate) struct ProcessTestContext { - pub(crate) event_handler_context: EventHandlerTestContext, - pub(crate) process: Process, - pub(crate) search_context: SearchTestContext, - pub(crate) todo_file_path: PathBuf, - pub(crate) view_context: ViewStateTestContext, + pub event_handler_context: EventHandlerTestContext, + pub process: Process, + pub search_context: SearchTestContext, + pub todo_file_path: PathBuf, + pub view_context: ViewStateTestContext, } pub(crate) fn process( diff --git a/src/test_helpers/with_event_handler.rs b/src/test_helpers/with_event_handler.rs index f3ab500e3..42bb9410d 100644 --- a/src/test_helpers/with_event_handler.rs +++ b/src/test_helpers/with_event_handler.rs @@ -8,11 +8,11 @@ use crate::{ #[non_exhaustive] pub(crate) struct EventHandlerTestContext { /// The `EventHandler` instance. - pub(crate) event_handler: EventHandler, + pub event_handler: EventHandler, /// The sender instance. - pub(crate) state: State, + pub state: State, /// The number of known available events. - pub(crate) number_events: usize, + pub number_events: usize, } /// Provide an `EventHandler` instance for use within a test. diff --git a/src/test_helpers/with_search.rs b/src/test_helpers/with_search.rs index c2e90364d..005f9383e 100644 --- a/src/test_helpers/with_search.rs +++ b/src/test_helpers/with_search.rs @@ -1,7 +1,7 @@ use crate::search::State; pub(crate) struct SearchTestContext { - pub(crate) state: State, + pub state: State, } pub(crate) fn with_search(callback: C) diff --git a/src/test_helpers/with_view_state.rs b/src/test_helpers/with_view_state.rs index 78b4a4014..cb66eab49 100644 --- a/src/test_helpers/with_view_state.rs +++ b/src/test_helpers/with_view_state.rs @@ -79,7 +79,7 @@ fn action_to_string(action: ViewAction) -> String { #[non_exhaustive] pub(crate) struct ViewStateTestContext { /// The state instance. - pub(crate) state: State, + pub state: State, } impl ViewStateTestContext { diff --git a/src/todo_file/history/history_item.rs b/src/todo_file/history/history_item.rs index f85276d71..a0560208c 100644 --- a/src/todo_file/history/history_item.rs +++ b/src/todo_file/history/history_item.rs @@ -2,10 +2,10 @@ use crate::todo_file::{Line, Operation}; #[derive(Debug, PartialEq, Eq)] pub(crate) struct HistoryItem { - pub(crate) start_index: usize, - pub(crate) end_index: usize, - pub(crate) operation: Operation, - pub(crate) lines: Vec, + pub start_index: usize, + pub end_index: usize, + pub operation: Operation, + pub lines: Vec, } impl HistoryItem { diff --git a/src/todo_file/todo_file_options.rs b/src/todo_file/todo_file_options.rs index bc057bba2..5846889b6 100644 --- a/src/todo_file/todo_file_options.rs +++ b/src/todo_file/todo_file_options.rs @@ -1,9 +1,9 @@ /// Options for `TodoFile` #[derive(Debug, Clone, PartialEq, Eq)] pub(crate) struct TodoFileOptions { - pub(crate) comment_prefix: String, - pub(crate) line_changed_command: Option, - pub(crate) undo_limit: u32, + pub comment_prefix: String, + pub line_changed_command: Option, + pub undo_limit: u32, } impl TodoFileOptions { diff --git a/src/view/thread/state.rs b/src/view/thread/state.rs index be4157fc2..85a66ff90 100644 --- a/src/view/thread/state.rs +++ b/src/view/thread/state.rs @@ -13,11 +13,12 @@ use crate::view::{RenderSlice, ViewAction, ViewData}; /// Represents a message sender and receiver for passing actions between threads. #[derive(Clone, Debug)] +#[allow(clippy::partial_pub_fields)] pub(crate) struct State { ended: Arc, paused: Arc, render_slice: Arc>, - pub(crate) update_receiver: crossbeam_channel::Receiver, + pub update_receiver: crossbeam_channel::Receiver, update_sender: crossbeam_channel::Sender, } From d241b4cdebc81f641d7be91387580b062f45218c Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 12:44:45 -0800 Subject: [PATCH 05/11] Silence clippy warnings about #[cfg(not(test))] It doesn't seem possible to disable the warning with an outer attribute, and using an inner attribute would cause inconsistent linting across files. Just disable the warning everywhere; presumably when we exclude code from test builds we do it intentionally. https://rust-lang.github.io/rust-clippy/master/index.html#cfg_not_test --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 458c5fe68..0cdcb35d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -175,6 +175,7 @@ absolute_paths = "allow" as_conversions = "allow" arithmetic_side_effects = "allow" bool_to_int_with_if = "allow" +cfg_not_test = "allow" default_numeric_fallback = "allow" else_if_without_else = "allow" expect_used = "allow" From 8c2332f9279c9efb79153a79cf23117ac30cb434 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 00:49:13 -0800 Subject: [PATCH 06/11] Update claims to 0.8.0 --- Cargo.lock | 7 ++----- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f19bdd840..38848b69f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -100,12 +100,9 @@ dependencies = [ [[package]] name = "claims" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6995bbe186456c36307f8ea36be3eefe42f49d106896414e18efc4fb2f846b5" -dependencies = [ - "autocfg", -] +checksum = "bba18ee93d577a8428902687bcc2b6b45a56b1981a1f6d779731c86cc4c5db18" [[package]] name = "cmake" diff --git a/Cargo.toml b/Cargo.toml index 0cdcb35d8..d8b3cfae8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ xi-unicode = "0.3.0" crossterm = { version = "0.27.0", features = ["use-dev-tty"] } [dev-dependencies] -claims = "0.7.1" +claims = "0.8.0" itertools = "0.13.0" pretty_assertions = "1.4.0" regex = "1.8.4" From 0b30198ca3b0d970e6c0331b34a6fed12fc343ef Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 00:50:28 -0800 Subject: [PATCH 07/11] Update version-track to 1.0.0 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 38848b69f..cb9ee73d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1028,9 +1028,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.8.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "rand", @@ -1044,9 +1044,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version-track" -version = "0.1.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9affed6b4e63b1f30ed8f0f2c401fa725f5f511eb00e52269f401c4d5ae12f" +checksum = "60ec7a62135e5134172e48cdc4a0e5499d357d65c1ee4f3442d51e05e3f71d7c" dependencies = [ "uuid", ] diff --git a/Cargo.toml b/Cargo.toml index d8b3cfae8..4d0a4fd7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ thiserror = "1.0.61" unicode-segmentation = "1.10.1" unicode-width = "0.1.12" uuid = { version = "1.8.0", features = ["v4", "fast-rng"] } -version-track = "0.1.0" +version-track = "1.0.0" xi-unicode = "0.3.0" [target.'cfg(target_os = "macos")'.dependencies] From 2ae5dd12fc1c94f5ca401afeffc59ee86f60fe48 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 00:54:23 -0800 Subject: [PATCH 08/11] Update unicode-width to 0.2.0 Upstream breaking change: `\n` is now treated as width 1. --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cb9ee73d4..bd2906cef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1011,9 +1011,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] name = "url" diff --git a/Cargo.toml b/Cargo.toml index 4d0a4fd7e..8a6595979 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ parking_lot = "0.12.3" pico-args = "0.5.0" thiserror = "1.0.61" unicode-segmentation = "1.10.1" -unicode-width = "0.1.12" +unicode-width = "0.2.0" uuid = { version = "1.8.0", features = ["v4", "fast-rng"] } version-track = "1.0.0" xi-unicode = "0.3.0" From ce6bf94ca9298943a10c9d9e4a34087565d9eb6a Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 00:55:39 -0800 Subject: [PATCH 09/11] Update git2 to 0.19.0 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd2906cef..24714c791 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -354,9 +354,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.18.3" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ "bitflags 2.5.0", "libc", @@ -473,9 +473,9 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libgit2-sys" -version = "0.16.2+1.7.2" +version = "0.17.0+1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 8a6595979..bc7c3aa03 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ captur = "0.1.0" chrono = "0.4.38" crossbeam-channel = "0.5.13" crossterm = "0.27.0" -git2 = { version = "0.18.3", default-features = false, features = [] } +git2 = { version = "0.19.0", default-features = false, features = [] } if_chain = "1.0.2" lazy_static = "1.4.0" num-format = "0.4.4" From dbd8f1824682116466f1f8112da471836cf5169d Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 00:56:35 -0800 Subject: [PATCH 10/11] Update captur to 1.0.1 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 24714c791..bc0740cb8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -64,9 +64,9 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "captur" -version = "0.1.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70fab32548d14602e13307a86c41b2dc2fc2ef19c2881bf63598275a7e45b182" +checksum = "c9a14cdf43feefc0ce44a775cd4e0c0fc68da9b82b2a3162f3d565aa38fed6ed" [[package]] name = "cc" diff --git a/Cargo.toml b/Cargo.toml index bc7c3aa03..9b6dfa530 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ path = "src/main.rs" [dependencies] anyhow = "1.0.86" bitflags = "2.5.0" -captur = "0.1.0" +captur = "1.0.0" chrono = "0.4.38" crossbeam-channel = "0.5.13" crossterm = "0.27.0" From 0b1ba7fb4ffce5447b75c4bac0c5cc4149dfa02d Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 17 Nov 2024 01:04:13 -0800 Subject: [PATCH 11/11] Update crossterm to 0.28.1 --- Cargo.lock | 50 ++++++++++++++++++++++++-------------------------- Cargo.toml | 4 ++-- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc0740cb8..82d76fabf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -136,16 +136,16 @@ checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crossterm" -version = "0.27.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ "bitflags 2.5.0", "crossterm_winapi", "filedescriptor", - "libc", "mio", "parking_lot", + "rustix", "signal-hook", "signal-hook-mio", "winapi", @@ -185,7 +185,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -377,6 +377,12 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -467,9 +473,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "libgit2-sys" @@ -513,9 +519,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -541,14 +547,15 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "log", "wasi", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -799,15 +806,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" dependencies = [ "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -874,9 +881,9 @@ dependencies = [ [[package]] name = "signal-hook-mio" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" dependencies = [ "libc", "mio", @@ -927,7 +934,7 @@ dependencies = [ "cfg-if", "fastrand", "rustix", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1142,15 +1149,6 @@ dependencies = [ "windows-targets 0.52.0", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" diff --git a/Cargo.toml b/Cargo.toml index 9b6dfa530..af7844284 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ bitflags = "2.5.0" captur = "1.0.0" chrono = "0.4.38" crossbeam-channel = "0.5.13" -crossterm = "0.27.0" +crossterm = "0.28.0" git2 = { version = "0.19.0", default-features = false, features = [] } if_chain = "1.0.2" lazy_static = "1.4.0" @@ -47,7 +47,7 @@ version-track = "1.0.0" xi-unicode = "0.3.0" [target.'cfg(target_os = "macos")'.dependencies] -crossterm = { version = "0.27.0", features = ["use-dev-tty"] } +crossterm = { version = "0.28.0", features = ["use-dev-tty"] } [dev-dependencies] claims = "0.8.0"