Skip to content

Commit 054dc7b

Browse files
committed
Bump rustfmt to latest nightly
1 parent 94cc6d4 commit 054dc7b

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ matrix:
3939
allow_failures:
4040
- rust: nightly
4141
include:
42-
- rust: nightly-2017-09-20
42+
- rust: nightly-2017-10-22
4343
env: RUSTFMT=YESPLEASE
4444
script:
45-
- cargo install --force rustfmt-nightly --vers 0.2.7
45+
- cargo install --force rustfmt-nightly --vers 0.2.9
4646
- export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib:$LD_LIBRARY_PATH
4747
- rustfmt --version
4848
- cargo fmt -- --write-mode=diff

src/crate_owner_invitation.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ fn accept_invite(
140140
.do_update()
141141
.set(crate_owners::deleted.eq(false))
142142
.execute(conn)?;
143-
delete(crate_owner_invitations::table.find((user_id, crate_invite.crate_id)))
144-
.execute(conn)?;
143+
delete(crate_owner_invitations::table.find((user_id, crate_invite.crate_id))).execute(conn)?;
145144

146145
#[derive(Serialize)]
147146
struct R {

src/render.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ mod tests {
185185

186186
#[test]
187187
fn text_with_inline_javascript() {
188-
let text = r#"foo_readme\n\n<a href="https://crates.io/crates/cargo-registry" onclick="window.alert('Got you')">Crate page</a>"#;
188+
let text =
189+
r#"foo_readme\n\n<a href="https://crates.io/crates/cargo-registry" onclick="window.alert('Got you')">Crate page</a>"#;
189190
let result = markdown_to_html(text).unwrap();
190191
assert_eq!(
191192
result,
@@ -230,7 +231,8 @@ mod tests {
230231

231232
#[test]
232233
fn manual_anchor_is_sanitized() {
233-
let text = "<h1><a href=\"#my-crate\" id=\"my-crate\"></a>My crate</h1>\n<p>Hello, world!</p>\n";
234+
let text =
235+
"<h1><a href=\"#my-crate\" id=\"my-crate\"></a>My crate</h1>\n<p>Hello, world!</p>\n";
234236
let result = markdown_to_html(text).unwrap();
235237
assert_eq!(
236238
result,

src/tests/user.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ fn test_github_login_does_not_overwrite_email() {
381381
assert_eq!(r.user.email, None);
382382
assert_eq!(r.user.login, "apricot");
383383

384-
let body = r#"{"user":{"email":"[email protected]","name":"Apricot Apricoto","login":"apricot","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/apricot","kind":null}}"#;
384+
let body =
385+
r#"{"user":{"email":"[email protected]","name":"Apricot Apricoto","login":"apricot","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/apricot","kind":null}}"#;
385386
let mut response = ok_resp!(
386387
middle.call(
387388
req.with_path(&format!("/api/v1/users/{}", user.id))
@@ -440,7 +441,8 @@ fn test_email_get_and_put() {
440441
assert_eq!(r.user.email, None);
441442
assert_eq!(r.user.login, "mango");
442443

443-
let body = r#"{"user":{"email":"[email protected]","name":"Mango McMangoface","login":"mango","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/mango","kind":null}}"#;
444+
let body =
445+
r#"{"user":{"email":"[email protected]","name":"Mango McMangoface","login":"mango","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/mango","kind":null}}"#;
444446
let mut response = ok_resp!(
445447
middle.call(
446448
req.with_path(&format!("/api/v1/users/{}", user.id))
@@ -479,7 +481,8 @@ fn test_empty_email_not_added() {
479481
user
480482
};
481483

482-
let body = r#"{"user":{"email":"","name":"Papayo Papaya","login":"papaya","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/papaya","kind":null}}"#;
484+
let body =
485+
r#"{"user":{"email":"","name":"Papayo Papaya","login":"papaya","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/papaya","kind":null}}"#;
483486
let json = bad_resp!(
484487
middle.call(
485488
req.with_path(&format!("/api/v1/users/{}", user.id))
@@ -494,7 +497,8 @@ fn test_empty_email_not_added() {
494497
json.errors
495498
);
496499

497-
let body = r#"{"user":{"email":null,"name":"Papayo Papaya","login":"papaya","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/papaya","kind":null}}"#;
500+
let body =
501+
r#"{"user":{"email":null,"name":"Papayo Papaya","login":"papaya","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/papaya","kind":null}}"#;
498502
let json = bad_resp!(
499503
middle.call(
500504
req.with_path(&format!("/api/v1/users/{}", user.id))
@@ -531,7 +535,8 @@ fn test_this_user_cannot_change_that_user_email() {
531535
unsigned_user
532536
};
533537

534-
let body = r#"{"user":{"email":"[email protected]","name":"Pine Apple","login":"pineapple","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/pineapple","kind":null}}"#;
538+
let body =
539+
r#"{"user":{"email":"[email protected]","name":"Pine Apple","login":"pineapple","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/pineapple","kind":null}}"#;
535540

536541
let json = bad_resp!(
537542
middle.call(
@@ -642,7 +647,8 @@ fn test_insert_into_email_table_with_email_change() {
642647
assert!(!r.user.email_verified);
643648
assert!(r.user.email_verification_sent);
644649

645-
let body = r#"{"user":{"email":"[email protected]","name":"potato","login":"potato","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/potato","kind":null}}"#;
650+
let body =
651+
r#"{"user":{"email":"[email protected]","name":"potato","login":"potato","avatar":"https://avatars0.githubusercontent.com","url":"https://github.com/potato","kind":null}}"#;
646652
let mut response = ok_resp!(
647653
middle.call(
648654
req.with_path(&format!("/api/v1/users/{}", user.id))

0 commit comments

Comments
 (0)