Fix build

This commit is contained in:
Steven Fackler 2016-09-24 20:10:57 -07:00
parent 599e5dbc69
commit 1ab8100a19
2 changed files with 3 additions and 4 deletions

View File

@ -1,17 +1,16 @@
extern crate rustc_serialize;
use self::rustc_serialize::json;
use std::io::{Cursor, Write};
use std::io::{Read, Write};
use std::error::Error;
use types::{FromSql, ToSql, IsNull, Type, SessionInfo};
impl FromSql for json::Json {
fn from_sql(ty: &Type,
raw: &[u8],
mut raw: &[u8],
_: &SessionInfo)
-> Result<json::Json, Box<Error + Sync + Send>> {
let mut raw = Cursor::new(raw);
if let Type::Jsonb = *ty {
let mut b = [0; 1];
try!(raw.read_exact(&mut b));

View File

@ -2,7 +2,7 @@ extern crate serde_json;
use self::serde_json::Value;
use std::error::Error;
use std::io::Write;
use std::io::{Read, Write};
use types::{FromSql, ToSql, IsNull, Type, SessionInfo};