diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-25 03:20:42 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-25 03:20:42 +0530 |
| commit | 0e36a27ec3dada93256622af20b2f8a2c85286ba (patch) | |
| tree | 18027e69b59ffcaa80eaab4c1e8a18e6adc9097e /src/libstd/sys | |
| parent | c9ace059e707392ceec46619ed032e93e6256dd5 (diff) | |
| parent | c11807d32a0dd9e386e73c106f90da04c27c65cc (diff) | |
| download | rust-0e36a27ec3dada93256622af20b2f8a2c85286ba.tar.gz rust-0e36a27ec3dada93256622af20b2f8a2c85286ba.zip | |
Rollup merge of #22623 - petrochenkov:optest, r=alexcrichton
Tests often use `vec![1, 2, 3]` instead of shorter and faster `[1, 2, 3]`. This patch removes a lot of unnecessary `vec!`s. Hopefully, the tests will compile and run a bit faster.
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/wtf8.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index 9119a3c60d8..fb9d6fef1fa 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -1202,11 +1202,11 @@ mod tests { string.code_points().map(|c| c.to_char()).collect::<Vec<_>>() } let mut string = Wtf8Buf::from_str("é "); - assert_eq!(cp(&string), vec![Some('é'), Some(' ')]); + assert_eq!(cp(&string), [Some('é'), Some(' ')]); string.push(c(0xD83D)); - assert_eq!(cp(&string), vec![Some('é'), Some(' '), None]); + assert_eq!(cp(&string), [Some('é'), Some(' '), None]); string.push(c(0xDCA9)); - assert_eq!(cp(&string), vec![Some('é'), Some(' '), Some('💩')]); + assert_eq!(cp(&string), [Some('é'), Some(' '), Some('💩')]); } #[test] |
