mirror of
https://github.com/isar/rusqlite.git
synced 2025-05-10 08:41:09 +08:00
Oops
This commit is contained in:
parent
524fce5a19
commit
62a8ec5371
@ -207,7 +207,7 @@ impl Context<'_> {
|
|||||||
/// Will panic if `arg` is greater than or equal to
|
/// Will panic if `arg` is greater than or equal to
|
||||||
/// [`self.len()`](Context::len).
|
/// [`self.len()`](Context::len).
|
||||||
pub fn set_aux<T: Send + Sync + 'static>(&self, arg: c_int, value: T) -> Result<Arc<T>> {
|
pub fn set_aux<T: Send + Sync + 'static>(&self, arg: c_int, value: T) -> Result<Arc<T>> {
|
||||||
assert!(idx < self.len());
|
assert!(arg < self.len() as i32);
|
||||||
let orig: Arc<T> = Arc::new(value);
|
let orig: Arc<T> = Arc::new(value);
|
||||||
let inner: AuxInner = orig.clone();
|
let inner: AuxInner = orig.clone();
|
||||||
let outer = Box::new(inner);
|
let outer = Box::new(inner);
|
||||||
@ -233,7 +233,7 @@ impl Context<'_> {
|
|||||||
/// Will panic if `arg` is greater than or equal to
|
/// Will panic if `arg` is greater than or equal to
|
||||||
/// [`self.len()`](Context::len).
|
/// [`self.len()`](Context::len).
|
||||||
pub fn get_aux<T: Send + Sync + 'static>(&self, arg: c_int) -> Result<Option<Arc<T>>> {
|
pub fn get_aux<T: Send + Sync + 'static>(&self, arg: c_int) -> Result<Option<Arc<T>>> {
|
||||||
assert!(idx < self.len());
|
assert!(arg < self.len() as i32);
|
||||||
let p = unsafe { ffi::sqlite3_get_auxdata(self.ctx, arg) as *const AuxInner };
|
let p = unsafe { ffi::sqlite3_get_auxdata(self.ctx, arg) as *const AuxInner };
|
||||||
if p.is_null() {
|
if p.is_null() {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user