File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1004,7 +1004,9 @@ mod _sqlite {
1004
1004
)
1005
1005
}
1006
1006
1007
+ // TODO: Make it build without clippy::manual_c_str_literals
1007
1008
#[ pymethod]
1009
+ #[ allow( clippy:: manual_c_str_literals) ]
1008
1010
fn backup ( zelf : & Py < Self > , args : BackupArgs , vm : & VirtualMachine ) -> PyResult < ( ) > {
1009
1011
let BackupArgs {
1010
1012
target,
@@ -1026,7 +1028,7 @@ mod _sqlite {
1026
1028
name_cstring = name. to_cstring ( vm) ?;
1027
1029
name_cstring. as_ptr ( )
1028
1030
} else {
1029
- c "main". as_ptr ( ) . cast ( )
1031
+ b "main\0 ". as_ptr ( ) . cast ( )
1030
1032
} ;
1031
1033
1032
1034
let sleep_ms = ( sleep * 1000.0 ) as c_int ;
@@ -1035,7 +1037,7 @@ mod _sqlite {
1035
1037
let target_db = target. db_lock ( vm) ?;
1036
1038
1037
1039
let handle = unsafe {
1038
- sqlite3_backup_init ( target_db. db , c "main". as_ptr ( ) . cast ( ) , db. db , name_ptr)
1040
+ sqlite3_backup_init ( target_db. db , b "main\0 ". as_ptr ( ) . cast ( ) , db. db , name_ptr)
1039
1041
} ;
1040
1042
1041
1043
if handle. is_null ( ) {
You can’t perform that action at this time.
0 commit comments