Skip to content

Commit a49c0c2

Browse files
committed
cargo fmt
1 parent 1d77987 commit a49c0c2

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

src/controllers/user/session.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ pub fn github_access_token(req: &mut dyn Request) -> CargoResult<Response> {
9494
}
9595

9696
// Fetch the access token from github using the code we just got
97-
let token = req
98-
.app()
99-
.github
100-
.exchange(code)
101-
.map_err(|s| human(&s))?;
97+
let token = req.app().github.exchange(code).map_err(|s| human(&s))?;
10298

10399
let ghuser = github::github::<GithubUser>(req.app(), "/user", &token)?;
104100

src/tests/badge.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,7 @@ fn update_attributes() {
317317
};
318318
let mut badge_attributes_travis_ci2 = HashMap::new();
319319
badge_attributes_travis_ci2.insert(String::from("repository"), String::from("rust-lang/rust"));
320-
badges.insert(
321-
String::from("travis-ci"),
322-
badge_attributes_travis_ci2,
323-
);
320+
badges.insert(String::from("travis-ci"), badge_attributes_travis_ci2);
324321
krate.update(&badges);
325322
let current_badges = krate.badges();
326323
assert_eq!(current_badges.len(), 1);

src/util/request_proxy.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ impl<'a> Request for RequestProxy<'a> {
1919
self.other.conduit_version()
2020
}
2121
fn method(&self) -> conduit::Method {
22-
self.method
23-
.clone()
24-
.unwrap_or_else(|| self.other.method())
22+
self.method.clone().unwrap_or_else(|| self.other.method())
2523
}
2624
fn scheme(&self) -> conduit::Scheme {
2725
self.other.scheme()

0 commit comments

Comments
 (0)