fix(refresh): BorrowMut for & and owned Client

That way, we are most flexible, at the cost of additional code.
This commit is contained in:
Sebastian Thiel
2015-02-27 20:08:53 +01:00
parent 4486bd595f
commit 88d4bf8c28
2 changed files with 13 additions and 8 deletions

View File

@@ -51,8 +51,7 @@
//! use oauth2::{RefreshFlow, AuthenticationType, RefreshResult};
//!
//! # #[test] fn refresh() {
//! let mut c = hyper::Client::new();
//! let mut f = RefreshFlow::new(&mut c);
//! let mut f = RefreshFlow::new(hyper::Client::new());
//! let new_token = match *f.refresh_token(AuthenticationType::Device,
//! "my_client_id", "my_secret",
//! "my_refresh_token") {