File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
branches/snap-stage3/src/libcollections Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 5ba7c5da62bae732bf466191dbeb5f699ba44d70
4
+ refs/heads/snap-stage3: 56c4e97e83ebe9d7553e2a66e67595fbd6a2246e
5
5
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
Original file line number Diff line number Diff line change @@ -1330,6 +1330,20 @@ mod tests {
1330
1330
"[[], [1], [1, 1]]" . to_string( ) ) ;
1331
1331
}
1332
1332
1333
+ #[ test]
1334
+ fn test_from_iterator ( ) {
1335
+ let s = "ศไทย中华Việt Nam" . to_string ( ) ;
1336
+ let t = "ศไทย中华" ;
1337
+ let u = "Việt Nam" ;
1338
+
1339
+ let a: String = s. chars ( ) . collect ( ) ;
1340
+ assert_eq ! ( s, a. as_slice( ) ) ;
1341
+
1342
+ let mut b = t. to_string ( ) ;
1343
+ b. extend ( u. chars ( ) ) ;
1344
+ assert_eq ! ( s, b. as_slice( ) ) ;
1345
+ }
1346
+
1333
1347
#[ bench]
1334
1348
fn bench_with_capacity ( b : & mut Bencher ) {
1335
1349
b. iter ( || {
You can’t perform that action at this time.
0 commit comments