From 0f67f59e585836145e436310caabb338b12062a7 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Mon, 16 Mar 2026 15:49:54 -0700 Subject: vendor nucleo fork into atuin workspace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename crates (nucleo → atuin-nucleo, nucleo-matcher → atuin-nucleo-matcher), add to workspace members and dependencies, update all import paths, remove vendored CI workflow, and suppress upstream clippy warnings. format codespell fixes clippy clappy --- crates/atuin-nucleo/src/lib.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/atuin-nucleo/src/lib.rs') diff --git a/crates/atuin-nucleo/src/lib.rs b/crates/atuin-nucleo/src/lib.rs index 5a500481..efc7628c 100644 --- a/crates/atuin-nucleo/src/lib.rs +++ b/crates/atuin-nucleo/src/lib.rs @@ -16,7 +16,7 @@ The [`Nucleo`] struct serves as the main API entrypoint for this crate. Nucleo is used in the helix-editor and therefore has a large user base with lots or real world testing. The core matcher implementation is considered complete -and is unlikely to see major changes. The `nucleo-matcher` crate is finished and +and is unlikely to see major changes. The `atuin-nucleo-matcher` crate is finished and ready for widespread use, breaking changes should be very rare (a 1.0 release should not be far away). @@ -45,7 +45,7 @@ use rayon::ThreadPool; use crate::pattern::MultiPattern; use crate::worker::Worker; -pub use nucleo_matcher::{chars, Config, Matcher, Utf32Str, Utf32String}; +pub use atuin_nucleo_matcher::{chars, Config, Matcher, Utf32Str, Utf32String}; mod boxcar; mod par_sort; @@ -67,7 +67,7 @@ pub struct Item<'a, T> { /// and sent across threads. pub struct Injector { items: Arc>, - notify: Arc<(dyn Fn() + Sync + Send)>, + notify: Arc, } impl Clone for Injector { @@ -93,10 +93,10 @@ impl Injector { /// /// You should favor this function over `push` if at least one of the following is true: /// - the number of items you're adding can be computed beforehand and is typically larger - /// than 1k + /// than 1k /// - you're able to batch incoming items /// - you're adding items from multiple threads concurrently (this function results in less - /// contention) + /// contention) pub fn extend(&self, values: I, fill_columns: impl Fn(&T, &mut [Utf32String])) where I: IntoIterator + ExactSizeIterator, @@ -298,7 +298,7 @@ pub struct Nucleo { pool: ThreadPool, state: State, items: Arc>, - notify: Arc<(dyn Fn() + Sync + Send)>, + notify: Arc, snapshot: Snapshot, /// The pattern matched by this matcher. To update the match pattern /// [`MultiPattern::reparse`](`pattern::MultiPattern::reparse`) should be used. @@ -316,7 +316,7 @@ pub struct Nucleo { impl Nucleo { /// Constructs a new `nucleo` worker threadpool with the provided `config`. /// - /// `notify` is called everytime new information is available and + /// `notify` is called every time new information is available and /// [`tick`](Nucleo::tick) should be called. Note that `notify` is not /// debounced, that should be handled by the downstream crate (for example /// debouncing to only redraw at most every 1/60 seconds). @@ -329,7 +329,7 @@ impl Nucleo { /// number of columns cannot be changed after construction. pub fn new( config: Config, - notify: Arc<(dyn Fn() + Sync + Send)>, + notify: Arc, num_threads: Option, columns: u32, ) -> Self { -- cgit v1.3.1