mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 16:29:20 +08:00
Remove unneeded #[feature]s
This commit is contained in:
parent
4e60f9bbb2
commit
b3d949b3bb
@ -48,7 +48,7 @@
|
||||
//! }
|
||||
//! }
|
||||
//! ```
|
||||
#![feature(unsafe_destructor, core, path, libc, rustc_private, collections)]
|
||||
#![feature(unsafe_destructor, core, libc, rustc_private)]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
|
||||
extern crate libc;
|
||||
|
@ -192,12 +192,13 @@ impl FromSql for String {
|
||||
|
||||
impl FromSql for Vec<u8> {
|
||||
unsafe fn column_result(stmt: *mut sqlite3_stmt, col: c_int) -> SqliteResult<Vec<u8>> {
|
||||
use std::slice::from_raw_parts;
|
||||
let c_blob = ffi::sqlite3_column_blob(stmt, col);
|
||||
let len = ffi::sqlite3_column_bytes(stmt, col);
|
||||
|
||||
assert!(len >= 0); let len = len as usize;
|
||||
|
||||
Ok(Vec::from_raw_buf(mem::transmute(c_blob), len))
|
||||
Ok(from_raw_parts(mem::transmute(c_blob), len).to_vec())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user