fix(dependencies): work with latest dependencies on nightly

Stable doesn't quite work yet due to the cargo issue further
described [here][cargo-issue]

[cargo-issue]: https://github.com/rust-lang/cargo/issues/2064
This commit is contained in:
Sebastian Thiel
2016-05-20 08:57:06 +02:00
parent 815d8863ed
commit 22bb255a55
5 changed files with 9 additions and 11 deletions

View File

@@ -15,11 +15,11 @@ chrono = ">= 0.2"
log = ">= 0.3"
mime = ">= 0.1"
url = "= 0.5"
hyper = "= 0.8.0"
hyper = "^ 0.9.0"
itertools = ">= 0.4"
serde = "0.6.0"
serde_json = "0.6.0"
serde_macros = { version = "0.6.0", optional = true }
serde = "0.7.5"
serde_json = "0.7.0"
serde_macros = { version = "0.7.5", optional = true }
[features]
default = ["with_syntex"]
@@ -28,7 +28,7 @@ with_syntex = ["serde_codegen", "syntex"]
[build-dependencies]
syntex = { version = "=0.28.0", optional = true }
serde_codegen = { version = "=0.6.13", optional = true }
serde_codegen = { version = "0.7.5", optional = true }
[dev-dependencies]
getopts = "0.2"

View File

@@ -1,6 +1,5 @@
use std::iter::IntoIterator;
use std::borrow::BorrowMut;
use std::collections::HashMap;
use std::hash::{SipHasher, Hash, Hasher};
use std::thread::sleep;
use std::cmp::min;

View File

@@ -134,7 +134,6 @@ impl<C> InstalledFlow<C> where C: BorrowMut<hyper::Client>
where T: AsRef<str> + 'a,
S: Iterator<Item = &'a T>
{
use std::error::Error;
let authcode = try!(self.get_authorization_code(auth_delegate, &appsecret, scopes));
let tokens = try!(self.request_token(&appsecret, &authcode));
@@ -311,7 +310,7 @@ impl InstalledFlowHandler {
// code, like this: http://localhost:8080/xyz/?code=4/731fJ3BheyCouCniPufAd280GHNV5Ju35yYcGs
// We take that code and send it to the get_authorization_code() function that
// waits for it.
for (param, val) in url.query_pairs().unwrap_or(Vec::new()) {
for (param, val) in url.query_pairs().into_owned() {
if param == "code".to_string() {
let _ = self.auth_code_snd.lock().unwrap().send(val);
}

View File

@@ -13,6 +13,7 @@ extern crate url;
extern crate itertools;
mod device;
mod storage;
mod installed;
mod helper;
mod refresh;
@@ -22,5 +23,6 @@ pub use device::{DeviceFlow, PollInformation, PollError};
pub use refresh::{RefreshFlow, RefreshResult};
pub use common::{Token, FlowType, ApplicationSecret, ConsoleApplicationSecret, Scheme, TokenType};
pub use installed::{InstalledFlow, InstalledFlowReturnMethod};
pub use helper::{TokenStorage, NullStorage, MemoryStorage, Authenticator, AuthenticatorDelegate,
pub use storage::{TokenStorage, NullStorage, MemoryStorage, DiskTokenStorage};
pub use helper::{Authenticator, AuthenticatorDelegate,
Retry, DefaultAuthenticatorDelegate, GetToken};

View File

@@ -7,7 +7,6 @@
extern crate serde_json;
use std::collections::HashMap;
use std::hash::Hasher;
use std::error::Error;
use std::fmt;
use std::fs;
@@ -114,7 +113,6 @@ pub struct DiskTokenStorage {
impl DiskTokenStorage {
pub fn new(location: &String) -> Result<DiskTokenStorage, io::Error> {
use std::fs;
let mut dts = DiskTokenStorage {
location: location.clone(),
tokens: HashMap::new(),