diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-13 00:58:32 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-13 00:58:32 +0200 |
| commit | 9352a0f7cfdd5f5fc102a25d8a93218bc3dbe462 (patch) | |
| tree | b998430c307c10defb79d91abe5d30471c5c4f12 /crates/turtle/src/atuin_daemon/client.rs | |
| parent | chore(treewide): Remove `cargo` warnings to 0 (diff) | |
| download | atuin-9352a0f7cfdd5f5fc102a25d8a93218bc3dbe462.zip | |
chore(treewide): Fix some of `clippy`'s error
Just a run of `cargo clippy --fix`
Diffstat (limited to 'crates/turtle/src/atuin_daemon/client.rs')
| -rw-r--r-- | crates/turtle/src/atuin_daemon/client.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/turtle/src/atuin_daemon/client.rs b/crates/turtle/src/atuin_daemon/client.rs index 4ec1a60b..2ea7ffc5 100644 --- a/crates/turtle/src/atuin_daemon/client.rs +++ b/crates/turtle/src/atuin_daemon/client.rs @@ -97,7 +97,7 @@ impl HistoryClient { let client = HistoryServiceClient::new(channel); - Ok(HistoryClient { client }) + Ok(Self { client }) } pub(crate) async fn start_history(&mut self, h: History) -> Result<StartHistoryReply> { @@ -169,7 +169,7 @@ impl SearchClient { let client = SearchServiceClient::new(channel); - Ok(SearchClient { client }) + Ok(Self { client }) } #[instrument(skip_all, level = Level::TRACE, name = "daemon_client_search", fields(query = %query, query_id = query_id))] @@ -198,19 +198,19 @@ impl SearchClient { impl From<FilterMode> for RpcFilterMode { fn from(filter_mode: FilterMode) -> Self { match filter_mode { - FilterMode::Global => RpcFilterMode::Global, - FilterMode::Host => RpcFilterMode::Host, - FilterMode::Session => RpcFilterMode::Session, - FilterMode::Directory => RpcFilterMode::Directory, - FilterMode::Workspace => RpcFilterMode::Workspace, - FilterMode::SessionPreload => RpcFilterMode::SessionPreload, + FilterMode::Global => Self::Global, + FilterMode::Host => Self::Host, + FilterMode::Session => Self::Session, + FilterMode::Directory => Self::Directory, + FilterMode::Workspace => Self::Workspace, + FilterMode::SessionPreload => Self::SessionPreload, } } } impl From<Context> for RpcSearchContext { fn from(context: Context) -> Self { - RpcSearchContext { + Self { session_id: context.session, cwd: context.cwd, hostname: context.hostname, @@ -248,7 +248,7 @@ impl SemanticClient { let client = SemanticServiceClient::new(channel); - Ok(SemanticClient { client }) + Ok(Self { client }) } #[cfg(unix)] @@ -299,7 +299,7 @@ impl ControlClient { let client = ControlServiceClient::new(channel); - Ok(ControlClient { client }) + Ok(Self { client }) } /// Connect using settings. |
