Remove unneeded #[feature]s

This commit is contained in:
John Gallagher 2015-03-17 00:44:37 -04:00
parent 4e60f9bbb2
commit b3d949b3bb
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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())
}
}