From 14ec768b4520d4fc34dbf24e663ea7db940c18b7 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Wed, 19 Mar 2025 12:44:20 +0000 Subject: chore: migrate to rust 2024 (#2635) * chore: upgrade to 2024 edition * ugh unsafe * format * nixxxxxxxxxxx why --- crates/atuin-client/src/database.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'crates/atuin-client/src/database.rs') diff --git a/crates/atuin-client/src/database.rs b/crates/atuin-client/src/database.rs index b64ff4ce..fd0284ba 100644 --- a/crates/atuin-client/src/database.rs +++ b/crates/atuin-client/src/database.rs @@ -10,14 +10,14 @@ use async_trait::async_trait; use atuin_common::utils; use fs_err as fs; use itertools::Itertools; -use rand::{distributions::Alphanumeric, Rng}; -use sql_builder::{bind::Bind, esc, quote, SqlBuilder, SqlName}; +use rand::{Rng, distributions::Alphanumeric}; +use sql_builder::{SqlBuilder, SqlName, bind::Bind, esc, quote}; use sqlx::{ + Result, Row, sqlite::{ SqliteConnectOptions, SqliteJournalMode, SqlitePool, SqlitePoolOptions, SqliteRow, SqliteSynchronous, }, - Result, Row, }; use time::OffsetDateTime; @@ -55,7 +55,9 @@ pub struct OptFilters { pub fn current_context() -> Context { let Ok(session) = env::var("ATUIN_SESSION") else { - eprintln!("ERROR: Failed to find $ATUIN_SESSION in the environment. Check that you have correctly set up your shell."); + eprintln!( + "ERROR: Failed to find $ATUIN_SESSION in the environment. Check that you have correctly set up your shell." + ); std::process::exit(1); }; let hostname = get_host_user(); @@ -131,7 +133,9 @@ impl Sqlite { debug!("opening sqlite database at {:?}", path); if utils::broken_symlink(path) { - eprintln!("Atuin: Sqlite db path ({path:?}) is a broken symlink. Unable to read or create replacement."); + eprintln!( + "Atuin: Sqlite db path ({path:?}) is a broken symlink. Unable to read or create replacement." + ); std::process::exit(1); } -- cgit v1.3.1