mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 00:39:20 +08:00
clippy::map_unwrap_or
This commit is contained in:
parent
576a8a96f6
commit
bcfe99578b
@ -629,8 +629,7 @@ impl InnerConnection {
|
|||||||
let boxed_hook: *mut F = p_arg as *mut F;
|
let boxed_hook: *mut F = p_arg as *mut F;
|
||||||
(*boxed_hook)(auth_ctx)
|
(*boxed_hook)(auth_ctx)
|
||||||
})
|
})
|
||||||
.map(Authorization::into_raw)
|
.map_or_else(|_| ffi::SQLITE_ERROR, Authorization::into_raw)
|
||||||
.unwrap_or_else(|_| ffi::SQLITE_ERROR)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let callback_fn = authorizer
|
let callback_fn = authorizer
|
||||||
@ -644,8 +643,7 @@ impl InnerConnection {
|
|||||||
callback_fn,
|
callback_fn,
|
||||||
boxed_authorizer
|
boxed_authorizer
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|f| &**f as *const F as *mut _)
|
.map_or_else(ptr::null_mut, |f| &**f as *const F as *mut _),
|
||||||
.unwrap_or_else(ptr::null_mut),
|
|
||||||
)
|
)
|
||||||
} {
|
} {
|
||||||
ffi::SQLITE_OK => {
|
ffi::SQLITE_OK => {
|
||||||
|
Loading…
Reference in New Issue
Block a user