File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 4
4
<!-- Rust supports benchmark tests, which can test the performance of your -->
5
5
<!-- code. Let's make our `src/lib.rs` look like this (comments elided): -->
6
6
Rustはコードのパフォーマンスをテストできるベンチマークテストをサポートしています。
7
- 早速、` src/lib.rc ` を以下のように作っていきましょう(コメントは省略しています):
7
+ 早速、 ` src/lib.rc ` を以下のように作っていきましょう(コメントは省略しています):
8
8
9
9
``` rust,ignore
10
10
#![feature(test)]
@@ -139,7 +139,8 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
139
139
# struct X ;
140
140
# impl X { fn iter <T , F >(& self , _ : F ) where F : FnMut () -> T {} } let b = X ;
141
141
b . iter (|| {
142
- // note lack of `;` (could also use an explicit `return`).
142
+ # // note lack of `;` (could also use an explicit `return`).
143
+ // `;` が無いことに注意して下さい (明示的な `return` を使うこともできます)。
143
144
(0 .. 1000 ). fold (0 , | old , new | old ^ new )
144
145
});
145
146
```
You can’t perform that action at this time.
0 commit comments