diff --git a/AGENTS.md b/AGENTS.md index 01c3a069..add61f17 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,7 +43,7 @@ atuin-server-sqlite SQLite implementation (sqlx) - Rust 2024 edition, toolchain 1.93.1. - Errors: `eyre::Result` in binaries, `thiserror` for typed errors in libraries. -- Derive boilerplate: `derive_more` (workspace dep) for `Display`, `From`, `Into`, `AsRef`, `Deref`, `Debug` on newtypes and simple enums. Prefer `derive_more` over manual `impl` when the formatting/conversion is a straight delegation. Use `thiserror` (not `derive_more`) for error types. Use `#[as_ref(forward)]` on string newtypes for `AsRef`. +- Derive boilerplate: `derive_more` (workspace dep) for `Display`, `From`, `Into`, `AsRef`, `Deref`, `Debug` on newtypes and simple enums. Prefer `derive_more` over manual `impl` when the formatting/conversion is a straight delegation. Use `thiserror` (not `derive_more`) for error types. Use `#[as_ref(str)]` on string newtypes for `AsRef`. - Async: tokio. Client uses `current_thread`; server uses `multi_thread`. - `#![deny(unsafe_code)]` on client/common, `#![forbid(unsafe_code)]` on server. - Clippy: `pedantic` + `nursery` on main crate. CI enforces `-D warnings -D clippy::redundant_clone`. diff --git a/crates/atuin-client/src/settings.rs b/crates/atuin-client/src/settings.rs index 6512df0b..3f871420 100644 --- a/crates/atuin-client/src/settings.rs +++ b/crates/atuin-client/src/settings.rs @@ -30,7 +30,7 @@ mod scripts; pub mod watcher; #[derive(derive_more::AsRef)] -#[as_ref(forward)] +#[as_ref(str)] pub struct HubEndpoint(String); /// Default sync address for Atuin's hosted service diff --git a/crates/atuin-daemon/src/components/semantic.rs b/crates/atuin-daemon/src/components/semantic.rs index bb0448c0..6ab563db 100644 --- a/crates/atuin-daemon/src/components/semantic.rs +++ b/crates/atuin-daemon/src/components/semantic.rs @@ -46,7 +46,7 @@ struct SemanticState { #[derive(Debug, Clone, PartialEq, Eq, Hash, derive_more::Display, derive_more::AsRef)] #[display("{_0}")] -#[as_ref(forward)] +#[as_ref(str)] struct SessionId(String); #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]