mirror of
https://github.com/isar/rusqlite.git
synced 2026-03-29 09:39:11 +08:00
Make VTab / VTabCursor unsafe trait as implmenting them on the wrong type is unsound
This commit is contained in:
committed by
Thom Chiovoloni
parent
3c6b57fe1b
commit
c9ef5bd63c
@@ -71,7 +71,7 @@ struct ArrayTab {
|
||||
base: ffi::sqlite3_vtab,
|
||||
}
|
||||
|
||||
impl VTab for ArrayTab {
|
||||
unsafe impl VTab for ArrayTab {
|
||||
type Aux = ();
|
||||
type Cursor = ArrayTabCursor;
|
||||
|
||||
@@ -149,7 +149,7 @@ impl ArrayTabCursor {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl VTabCursor for ArrayTabCursor {
|
||||
unsafe impl VTabCursor for ArrayTabCursor {
|
||||
fn filter(&mut self, idx_num: c_int, _idx_str: Option<&str>, args: &Values<'_>) -> Result<()> {
|
||||
if idx_num > 0 {
|
||||
self.ptr = args.get_array(0)?;
|
||||
|
||||
Reference in New Issue
Block a user