diff options
author | David Tolnay <dtolnay@chromium.org> | 2018-12-12 14:33:42 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-12-13 19:28:04 -0800 |
commit | 2bac1e7a9c710d6ad3e50a10463f758a1b5db40a (patch) | |
tree | fefb6ff3f38f84698b5e558f2692af15793bdde0 /p9 | |
parent | 3397126b3c862fbd58c7fd31e90eb64c524d27ec (diff) | |
download | crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.gz crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.bz2 crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.lz crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.xz crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.tar.zst crosvm-2bac1e7a9c710d6ad3e50a10463f758a1b5db40a.zip |
toolchain: Update to Rust 1.31.0
We updated the production toolchain from 1.30 to 1.31 in CL:1366446. This CL does the same upgrade for the local developer toolchain and Kokoro. The relevant changes are in rust-toolchain and kokoro/Dockerfile. The rest are from rustfmt. TEST=cargo fmt --all -- --check TEST=as described in kokoro/README.md Change-Id: I3b4913f3e237baa36c664b4953be360c09efffd4 Reviewed-on: https://chromium-review.googlesource.com/1374376 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'p9')
-rw-r--r-- | p9/src/protocol/wire_format.rs | 21 | ||||
-rw-r--r-- | p9/src/server.rs | 6 |
2 files changed, 18 insertions, 9 deletions
diff --git a/p9/src/protocol/wire_format.rs b/p9/src/protocol/wire_format.rs index afdc097..bd3d67b 100644 --- a/p9/src/protocol/wire_format.rs +++ b/p9/src/protocol/wire_format.rs @@ -336,7 +336,8 @@ mod test { 0x0c, 0x00, 0x47, 0x6F, 0x6F, 0x67, 0x6C, 0x65, 0x20, 0x56, 0x69, 0x64, 0x65, 0x6F, ][..] - )).unwrap() + )) + .unwrap() ); assert_eq!( String::from("网页 图片 资讯更多 »"), @@ -346,7 +347,8 @@ mod test { 0x89, 0x87, 0x20, 0xE8, 0xB5, 0x84, 0xE8, 0xAE, 0xAF, 0xE6, 0x9B, 0xB4, 0xE5, 0xA4, 0x9A, 0x20, 0xC2, 0xBB, ][..] - )).unwrap() + )) + .unwrap() ); assert_eq!( String::from("Παγκόσμιος Ιστός"), @@ -356,7 +358,8 @@ mod test { 0x83, 0xCE, 0xBC, 0xCE, 0xB9, 0xCE, 0xBF, 0xCF, 0x82, 0x20, 0xCE, 0x99, 0xCF, 0x83, 0xCF, 0x84, 0xCF, 0x8C, 0xCF, 0x82, ][..] - )).unwrap() + )) + .unwrap() ); assert_eq!( String::from("Поиск страниц на русском"), @@ -367,7 +370,8 @@ mod test { 0x86, 0x20, 0xD0, 0xBD, 0xD0, 0xB0, 0x20, 0xD1, 0x80, 0xD1, 0x83, 0xD1, 0x81, 0xD1, 0x81, 0xD0, 0xBA, 0xD0, 0xBE, 0xD0, 0xBC, ][..] - )).unwrap() + )) + .unwrap() ); assert_eq!( String::from("전체서비스"), @@ -376,7 +380,8 @@ mod test { 0x0f, 0x00, 0xEC, 0xA0, 0x84, 0xEC, 0xB2, 0xB4, 0xEC, 0x84, 0x9C, 0xEB, 0xB9, 0x84, 0xEC, 0x8A, 0xA4, ][..] - )).unwrap() + )) + .unwrap() ); } @@ -384,11 +389,13 @@ mod test { fn invalid_string_decode() { let _ = <String as WireFormat>::decode(&mut Cursor::new(&[ 0x06, 0x00, 0xed, 0xa0, 0x80, 0xed, 0xbf, 0xbf, - ])).expect_err("surrogate code point"); + ])) + .expect_err("surrogate code point"); let _ = <String as WireFormat>::decode(&mut Cursor::new(&[ 0x05, 0x00, 0xf8, 0x80, 0x80, 0x80, 0xbf, - ])).expect_err("overlong sequence"); + ])) + .expect_err("overlong sequence"); let _ = <String as WireFormat>::decode(&mut Cursor::new(&[0x04, 0x00, 0xf4, 0x90, 0x80, 0x80])) diff --git a/p9/src/server.rs b/p9/src/server.rs index d3d7547..4b47956 100644 --- a/p9/src/server.rs +++ b/p9/src/server.rs @@ -402,7 +402,8 @@ impl Server { msg: Rmessage::Read(Rread { data: Data(Vec::new()), }), - }.byte_size(); + } + .byte_size(); let capacity = min(self.msize - header_size, read.count); let mut buf = Data(Vec::with_capacity(capacity as usize)); @@ -779,7 +780,8 @@ impl Server { msg: Rmessage::Readdir(Rreaddir { data: Data(Vec::new()), }), - }.byte_size(); + } + .byte_size(); let count = min(self.msize - header_size, readdir.count); let mut cursor = Cursor::new(Vec::with_capacity(count as usize)); |