chore(serde): update to serde 0.5.0

Serde move all json code into a separate crate, which we are now pulling
in separately.
This commit is contained in:
Sebastian Thiel
2015-08-08 10:39:05 +02:00
parent 267b2ef770
commit a169d9610d
8 changed files with 14 additions and 7 deletions

View File

@@ -190,7 +190,7 @@ pub mod tests {
#[test]
fn console_secret() {
use serde::json;
use serde_json as json;
match json::from_str::<ConsoleApplicationSecret>(SECRET) {
Ok(s) => assert!(s.installed.is_some() && s.web.is_none()),
Err(err) => panic!(err),

View File

@@ -7,7 +7,7 @@ use hyper;
use hyper::header::ContentType;
use url::form_urlencoded;
use itertools::Itertools;
use serde::json;
use serde_json as json;
use chrono::{DateTime,UTC};
use std::borrow::BorrowMut;
use std::io::Read;

View File

@@ -481,7 +481,7 @@ mod tests {
#[test]
fn flow() {
use serde::json;
use serde_json as json;
let secret = json::from_str::<ConsoleApplicationSecret>(SECRET).unwrap().installed.unwrap();
let res = Authenticator::new(&secret, DefaultAuthenticatorDelegate,

View File

@@ -20,7 +20,7 @@
//! extern crate serde;
//!
//! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, PollInformation, ConsoleApplicationSecret, MemoryStorage, GetToken};
//! use serde::json;
//! use serde_json as json;
//! use std::default::Default;
//! # const SECRET: &'static str = "{\"installed\":{\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_secret\":\"UqkDJd5RFwnHoiG5x5Rub8SI\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"client_email\":\"\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"oob\"],\"client_x509_cert_url\":\"\",\"client_id\":\"14070749909-vgip2f1okm7bkvajhi9jugan6126io9v.apps.googleusercontent.com\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\"}}";
//!

View File

@@ -1,4 +1,5 @@
extern crate serde;
extern crate serde_json;
extern crate chrono;

View File

@@ -4,7 +4,7 @@ use device::GOOGLE_TOKEN_URL;
use chrono::UTC;
use hyper;
use hyper::header::ContentType;
use serde::json;
use serde_json as json;
use url::form_urlencoded;
use super::Token;
use std::borrow::BorrowMut;