aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-daemon/src/search
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-11 00:54:30 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-11 00:54:30 +0200
commit5c39e7cf284a1f6e9a1657f2deb44e359fc47eb8 (patch)
treec64baa8d5866c8e339eaf660dd3f94f30a3f7d8a /crates/atuin-daemon/src/search
parentchore: Somewhat simplify sync code (diff)
downloadatuin-5c39e7cf284a1f6e9a1657f2deb44e359fc47eb8.zip
chore: Move everything into one big crate
That helps remove duplicated code and rustc/cargo will now also show dead code correctly.
Diffstat (limited to '')
-rw-r--r--crates/turtle/src/atuin_daemon/search/index.rs (renamed from crates/atuin-daemon/src/search/index.rs)13
-rw-r--r--crates/turtle/src/atuin_daemon/search/mod.rs (renamed from crates/atuin-daemon/src/search/mod.rs)0
2 files changed, 7 insertions, 6 deletions
diff --git a/crates/atuin-daemon/src/search/index.rs b/crates/turtle/src/atuin_daemon/search/index.rs
index bb155979..df627e1b 100644
--- a/crates/atuin-daemon/src/search/index.rs
+++ b/crates/turtle/src/atuin_daemon/search/index.rs
@@ -12,8 +12,11 @@ use std::{
sync::Arc,
};
-use atuin_client::history::{History, is_known_agent};
-use atuin_client::settings::Search;
+use crate::atuin_client::settings::Search;
+use crate::{
+ atuin_client::history::{History, is_known_agent},
+ atuin_daemon::components::search::with_trailing_slash,
+};
use atuin_nucleo::{Injector, Nucleo, pattern};
use dashmap::DashMap;
use lasso::{Spur, ThreadedRodeo};
@@ -22,8 +25,6 @@ use tokio::sync::RwLock;
use tracing::{Level, instrument};
use uuid::Uuid;
-use crate::components::search::with_trailing_slash;
-
/// Parse a UUID string into a 16-byte array.
/// Returns None if the string is not a valid UUID.
fn parse_uuid_bytes(s: &str) -> Option<[u8; 16]> {
@@ -491,7 +492,7 @@ mod tests {
#[test]
fn frecency_data_compute() {
- let now = 1000000i64;
+ let now = 1_000_000i64;
// Recent command (with default multipliers of 1.0)
let recent = FrecencyData {
@@ -518,7 +519,7 @@ mod tests {
#[test]
fn frecency_data_compute_with_multipliers() {
- let now = 1000000i64;
+ let now = 1_000_000_i64;
let data = FrecencyData {
count: 5,
diff --git a/crates/atuin-daemon/src/search/mod.rs b/crates/turtle/src/atuin_daemon/search/mod.rs
index 4d261956..4d261956 100644
--- a/crates/atuin-daemon/src/search/mod.rs
+++ b/crates/turtle/src/atuin_daemon/search/mod.rs