Skip to content

Commit 3bd9ef9

Browse files
committed
fix: happy udeps
1 parent 11871ac commit 3bd9ef9

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

libsql/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ sync = [
9999
"parser",
100100
"serde",
101101
"stream",
102+
"remote",
103+
"replication",
102104
"dep:tower",
103105
"dep:hyper",
104106
"dep:http",

libsql/src/database.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ pub use builder::Builder;
88
pub use libsql_sys::{Cipher, EncryptionConfig};
99

1010
use crate::{Connection, Result};
11-
use std::{
12-
fmt,
13-
sync::{atomic::AtomicU64, Arc},
14-
};
15-
use tokio::sync::Mutex;
11+
use std::fmt;
12+
use std::sync::atomic::AtomicU64;
1613

1714
cfg_core! {
1815
bitflags::bitflags! {
@@ -126,7 +123,7 @@ pub struct Database {
126123
db_type: DbType,
127124
/// The maximum replication index returned from a write performed using any connection created using this Database object.
128125
#[allow(dead_code)]
129-
max_write_replication_index: Arc<AtomicU64>,
126+
max_write_replication_index: std::sync::Arc<AtomicU64>,
130127
}
131128

132129
cfg_core! {
@@ -551,7 +548,7 @@ impl Database {
551548

552549
let conn = db.connect()?;
553550

554-
let conn = Arc::new(LibsqlConnection { conn });
551+
let conn = std::sync::Arc::new(LibsqlConnection { conn });
555552

556553
Ok(Connection { conn })
557554
}
@@ -599,7 +596,7 @@ impl Database {
599596
}
600597
}
601598

602-
let conn = Arc::new(LibsqlConnection { conn });
599+
let conn = std::sync::Arc::new(LibsqlConnection { conn });
603600

604601
Ok(Connection { conn })
605602
}
@@ -645,7 +642,7 @@ impl Database {
645642
writer,
646643
self.max_write_replication_index.clone(),
647644
);
648-
let conn = Arc::new(remote);
645+
let conn = std::sync::Arc::new(remote);
649646

650647
Ok(Connection { conn })
651648
}
@@ -665,6 +662,7 @@ impl Database {
665662
replication::connection::State,
666663
sync::connection::SyncedConnection,
667664
};
665+
use tokio::sync::Mutex;
668666

669667
let local = db.connect()?;
670668

@@ -678,14 +676,14 @@ impl Database {
678676
),
679677
read_your_writes: *read_your_writes,
680678
context: db.sync_ctx.clone().unwrap(),
681-
state: Arc::new(Mutex::new(State::Init)),
679+
state: std::sync::Arc::new(Mutex::new(State::Init)),
682680
};
683681

684-
let conn = Arc::new(synced);
682+
let conn = std::sync::Arc::new(synced);
685683
return Ok(Connection { conn });
686684
}
687685

688-
let conn = Arc::new(LibsqlConnection { conn: local });
686+
let conn = std::sync::Arc::new(LibsqlConnection { conn: local });
689687
Ok(Connection { conn })
690688
}
691689

@@ -696,7 +694,7 @@ impl Database {
696694
connector,
697695
version,
698696
} => {
699-
let conn = Arc::new(
697+
let conn = std::sync::Arc::new(
700698
crate::hrana::connection::HttpConnection::new_with_connector(
701699
url,
702700
auth_token,

libsql/src/local/database.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::sync::{Arc, Once};
1+
use std::sync::Once;
22

33
cfg_replication!(
44
use http::uri::InvalidUri;
@@ -21,6 +21,7 @@ cfg_replication!(
2121
cfg_sync! {
2222
use crate::sync::SyncContext;
2323
use tokio::sync::Mutex;
24+
use std::sync::Arc;
2425
}
2526

2627
use crate::{database::OpenFlags, local::connection::Connection, Error::ConnectionFailed, Result};

0 commit comments

Comments
 (0)