Fix tyvar_behind_raw_pointer warnings

This commit is contained in:
gwenn 2018-03-10 18:07:30 +01:00
parent 402d5340d5
commit 3b5e224f82

View File

@ -443,7 +443,7 @@ impl InnerConnection {
} }
}; };
if (*pac).is_null() { if (*pac as *mut A).is_null() {
*pac = Box::into_raw(Box::new((*boxed_aggr).init())); *pac = Box::into_raw(Box::new((*boxed_aggr).init()));
} }
@ -470,7 +470,7 @@ impl InnerConnection {
// sqlite3_aggregate_context(C,N) so that no pointless memory allocations occur. // sqlite3_aggregate_context(C,N) so that no pointless memory allocations occur.
let a: Option<A> = match aggregate_context(ctx, 0) { let a: Option<A> = match aggregate_context(ctx, 0) {
Some(pac) => { Some(pac) => {
if (*pac).is_null() { if (*pac as *mut A).is_null() {
None None
} else { } else {
let a = Box::from_raw(*pac); let a = Box::from_raw(*pac);