Skip to content

Commit

Permalink
fix(dependencies): work with latest dependencies on nightly
Browse files Browse the repository at this point in the history
Stable doesn't quite work yet due to the cargo issue further
described [here][cargo-issue]

[cargo-issue]: rust-lang/cargo#2064
  • Loading branch information
Byron committed May 20, 2016
1 parent 815d886 commit 22bb255
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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"
Expand Down
1 change: 0 additions & 1 deletion src/helper.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/installed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ extern crate url;
extern crate itertools;

mod device;
mod storage;
mod installed;
mod helper;
mod refresh;
Expand All @@ -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};
2 changes: 0 additions & 2 deletions src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 22bb255

Please sign in to comment.