Skip to content
Open
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
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ impl<T> Clone for Injector<T> {
}

impl<T> Injector<T> {
/// Appends an element to the list of matched items.
/// Appends an element to the list of candidates.
/// This function is lock-free and wait-free.
pub fn push(&self, value: T, fill_columns: impl FnOnce(&T, &mut [Utf32String])) -> u32 {
let idx = self.items.push(value, fill_columns);
(self.notify)();
idx
}

/// Appends multiple elements to the list of matched items.
/// Appends multiple elements to the list of candidates.
/// This function is lock-free and wait-free.
///
/// You should favor this function over `push` if at least one of the following is true:
Expand Down Expand Up @@ -295,8 +295,8 @@ pub struct Nucleo<T: Sync + Send + 'static> {
impl<T: Sync + Send + 'static> Nucleo<T> {
/// Constructs a new `nucleo` worker threadpool with the provided `config`.
///
/// `notify` is called everytime new information is available and
/// [`tick`](Nucleo::tick) should be called. Note that `notify` is not
/// `notify` is called every time a candidate item is pushed to the injector,
/// which means [`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).
///
Expand Down
Loading