Make VTab / VTabCursor unsafe trait as implmenting them on the wrong type is unsound

This commit is contained in:
Thom Chiovoloni
2020-04-14 07:39:41 -07:00
committed by Thom Chiovoloni
parent 3c6b57fe1b
commit c9ef5bd63c
4 changed files with 13 additions and 9 deletions

View File

@@ -95,7 +95,7 @@ impl CSVTab {
}
}
impl VTab for CSVTab {
unsafe impl VTab for CSVTab {
type Aux = ();
type Cursor = CSVTabCursor;
@@ -296,7 +296,7 @@ impl CSVTabCursor {
}
}
impl VTabCursor for CSVTabCursor {
unsafe impl VTabCursor for CSVTabCursor {
// Only a full table scan is supported. So `filter` simply rewinds to
// the beginning.
fn filter(