@@ -8,11 +8,8 @@ pub use builder::Builder;
8
8
pub use libsql_sys:: { Cipher , EncryptionConfig } ;
9
9
10
10
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 ;
16
13
17
14
cfg_core ! {
18
15
bitflags:: bitflags! {
@@ -126,7 +123,7 @@ pub struct Database {
126
123
db_type : DbType ,
127
124
/// The maximum replication index returned from a write performed using any connection created using this Database object.
128
125
#[ allow( dead_code) ]
129
- max_write_replication_index : Arc < AtomicU64 > ,
126
+ max_write_replication_index : std :: sync :: Arc < AtomicU64 > ,
130
127
}
131
128
132
129
cfg_core ! {
@@ -551,7 +548,7 @@ impl Database {
551
548
552
549
let conn = db. connect ( ) ?;
553
550
554
- let conn = Arc :: new ( LibsqlConnection { conn } ) ;
551
+ let conn = std :: sync :: Arc :: new ( LibsqlConnection { conn } ) ;
555
552
556
553
Ok ( Connection { conn } )
557
554
}
@@ -599,7 +596,7 @@ impl Database {
599
596
}
600
597
}
601
598
602
- let conn = Arc :: new ( LibsqlConnection { conn } ) ;
599
+ let conn = std :: sync :: Arc :: new ( LibsqlConnection { conn } ) ;
603
600
604
601
Ok ( Connection { conn } )
605
602
}
@@ -645,7 +642,7 @@ impl Database {
645
642
writer,
646
643
self . max_write_replication_index . clone ( ) ,
647
644
) ;
648
- let conn = Arc :: new ( remote) ;
645
+ let conn = std :: sync :: Arc :: new ( remote) ;
649
646
650
647
Ok ( Connection { conn } )
651
648
}
@@ -665,6 +662,7 @@ impl Database {
665
662
replication:: connection:: State ,
666
663
sync:: connection:: SyncedConnection ,
667
664
} ;
665
+ use tokio:: sync:: Mutex ;
668
666
669
667
let local = db. connect ( ) ?;
670
668
@@ -678,14 +676,14 @@ impl Database {
678
676
) ,
679
677
read_your_writes : * read_your_writes,
680
678
context : db. sync_ctx . clone ( ) . unwrap ( ) ,
681
- state : Arc :: new ( Mutex :: new ( State :: Init ) ) ,
679
+ state : std :: sync :: Arc :: new ( Mutex :: new ( State :: Init ) ) ,
682
680
} ;
683
681
684
- let conn = Arc :: new ( synced) ;
682
+ let conn = std :: sync :: Arc :: new ( synced) ;
685
683
return Ok ( Connection { conn } ) ;
686
684
}
687
685
688
- let conn = Arc :: new ( LibsqlConnection { conn : local } ) ;
686
+ let conn = std :: sync :: Arc :: new ( LibsqlConnection { conn : local } ) ;
689
687
Ok ( Connection { conn } )
690
688
}
691
689
@@ -696,7 +694,7 @@ impl Database {
696
694
connector,
697
695
version,
698
696
} => {
699
- let conn = Arc :: new (
697
+ let conn = std :: sync :: Arc :: new (
700
698
crate :: hrana:: connection:: HttpConnection :: new_with_connector (
701
699
url,
702
700
auth_token,
0 commit comments