@@ -12,6 +12,12 @@ pub(crate) use _sqlite3::module_def;
1212
1313#[ pymodule]
1414mod _sqlite3 {
15+ use core:: {
16+ ffi:: { CStr , c_int, c_longlong, c_uint, c_void} ,
17+ fmt:: Debug ,
18+ ops:: Deref ,
19+ ptr:: { NonNull , null, null_mut} ,
20+ } ;
1521 use libsqlite3_sys:: {
1622 SQLITE_BLOB , SQLITE_DETERMINISTIC , SQLITE_FLOAT , SQLITE_INTEGER , SQLITE_NULL ,
1723 SQLITE_OPEN_CREATE , SQLITE_OPEN_READWRITE , SQLITE_OPEN_URI , SQLITE_TEXT , SQLITE_TRACE_STMT ,
@@ -70,13 +76,7 @@ mod _sqlite3 {
7076 } ,
7177 utils:: ToCString ,
7278 } ;
73- use std:: {
74- ffi:: { CStr , c_int, c_longlong, c_uint, c_void} ,
75- fmt:: Debug ,
76- ops:: Deref ,
77- ptr:: { NonNull , null, null_mut} ,
78- thread:: ThreadId ,
79- } ;
79+ use std:: thread:: ThreadId ;
8080
8181 macro_rules! exceptions {
8282 ( $( ( $x: ident, $base: expr) ) ,* ) => {
@@ -451,7 +451,7 @@ mod _sqlite3 {
451451 ) {
452452 let context = SqliteContext :: from ( context) ;
453453 let ( func, vm) = unsafe { ( * context. user_data :: < Self > ( ) ) . retrieve ( ) } ;
454- let args = unsafe { std :: slice:: from_raw_parts ( argv, argc as usize ) } ;
454+ let args = unsafe { core :: slice:: from_raw_parts ( argv, argc as usize ) } ;
455455
456456 let f = || -> PyResult < ( ) > {
457457 let db = context. db_handle ( ) ;
@@ -478,7 +478,7 @@ mod _sqlite3 {
478478 ) {
479479 let context = SqliteContext :: from ( context) ;
480480 let ( cls, vm) = unsafe { ( * context. user_data :: < Self > ( ) ) . retrieve ( ) } ;
481- let args = unsafe { std :: slice:: from_raw_parts ( argv, argc as usize ) } ;
481+ let args = unsafe { core :: slice:: from_raw_parts ( argv, argc as usize ) } ;
482482 let instance = context. aggregate_context :: < * const PyObject > ( ) ;
483483 if unsafe { ( * instance) . is_null ( ) } {
484484 match cls. call ( ( ) , vm) {
@@ -556,7 +556,7 @@ mod _sqlite3 {
556556 ) {
557557 let context = SqliteContext :: from ( context) ;
558558 let ( _, vm) = unsafe { ( * context. user_data :: < Self > ( ) ) . retrieve ( ) } ;
559- let args = unsafe { std :: slice:: from_raw_parts ( argv, argc as usize ) } ;
559+ let args = unsafe { core :: slice:: from_raw_parts ( argv, argc as usize ) } ;
560560 let instance = context. aggregate_context :: < * const PyObject > ( ) ;
561561 let instance = unsafe { & * * instance } ;
562562
@@ -882,7 +882,7 @@ mod _sqlite3 {
882882 }
883883
884884 impl Debug for Connection {
885- fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> Result < ( ) , std :: fmt:: Error > {
885+ fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> Result < ( ) , core :: fmt:: Error > {
886886 write ! ( f, "Sqlite3 Connection" )
887887 }
888888 }
@@ -2077,7 +2077,7 @@ mod _sqlite3 {
20772077 } else {
20782078 let nbytes = st. column_bytes ( i) ;
20792079 let blob = unsafe {
2080- std :: slice:: from_raw_parts ( blob. cast :: < u8 > ( ) , nbytes as usize )
2080+ core :: slice:: from_raw_parts ( blob. cast :: < u8 > ( ) , nbytes as usize )
20812081 } ;
20822082 let blob = vm. ctx . new_bytes ( blob. to_vec ( ) ) ;
20832083 converter. call ( ( blob, ) , vm) ?
@@ -2684,7 +2684,7 @@ mod _sqlite3 {
26842684 }
26852685
26862686 impl Debug for Statement {
2687- fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> Result < ( ) , std :: fmt:: Error > {
2687+ fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> Result < ( ) , core :: fmt:: Error > {
26882688 write ! (
26892689 f,
26902690 "{} Statement" ,
0 commit comments