File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ async fn sqlite_open<P: AsRef<Path>>(path: P) -> Result<sqlx::SqlitePool> {
4444 sqlx:: sqlite:: SqliteConnectOptions :: new ( )
4545 . filename ( path)
4646 . read_only ( true )
47- // not needed for readonly db
48- . pragma ( "synchronous" , "off" )
47+ . pragma ( "synchronous" , "off" ) // not needed for readonly db
48+ . serialized ( false ) // same as OPEN_NOMUTEX
4949 . create_if_missing ( false ) ,
5050 )
5151 . await ?)
@@ -222,7 +222,7 @@ mod tests {
222222 let tempfile = tempfile:: NamedTempFile :: new ( ) ?. into_temp_path ( ) ;
223223 create ( & mut tf, & tempfile) . await ?;
224224
225- let pool = sqlite_open ( tempfile) . await ?;
225+ let pool = sqlite_open ( & tempfile) . await ?;
226226 let mut conn = pool. acquire ( ) . await ?;
227227
228228 let result = sqlx:: query ( "SELECT count(*) FROM files" )
Original file line number Diff line number Diff line change @@ -51,16 +51,16 @@ impl AsyncWrite for SizedBuffer {
5151 _cx : & mut task:: Context < ' _ > ,
5252 buf : & [ u8 ] ,
5353 ) -> task:: Poll < io:: Result < usize > > {
54- let this = self . get_mut ( ) ;
55- match io:: Write :: write ( & mut this. inner , buf) {
54+ let mut this = self . get_mut ( ) ;
55+ match io:: Write :: write ( & mut this, buf) {
5656 Ok ( n) => task:: Poll :: Ready ( Ok ( n) ) ,
5757 Err ( e) => task:: Poll :: Ready ( Err ( e) ) ,
5858 }
5959 }
6060
6161 fn poll_flush ( self : Pin < & mut Self > , _cx : & mut task:: Context < ' _ > ) -> task:: Poll < io:: Result < ( ) > > {
62- let this = self . get_mut ( ) ;
63- match io:: Write :: flush ( & mut this. inner ) {
62+ let mut this = self . get_mut ( ) ;
63+ match io:: Write :: flush ( & mut this) {
6464 Ok ( ( ) ) => task:: Poll :: Ready ( Ok ( ( ) ) ) ,
6565 Err ( e) => task:: Poll :: Ready ( Err ( e) ) ,
6666 }
You can’t perform that action at this time.
0 commit comments