提交 6f28816f 编写于 作者: J Jorge Aparicio

Remove some unnecessary `move` keywords

上级 745225d9
......@@ -68,7 +68,7 @@ pub fn bench_int<T:MutableSet<uint>,
rand_cap: uint,
f: || -> T) { {
let mut set = f();
timed(&mut self.sequential_ints, move || {
timed(&mut self.sequential_ints, || {
for i in range(0u, num_keys) {
set.insert(i);
}
......@@ -81,7 +81,7 @@ pub fn bench_int<T:MutableSet<uint>,
{
let mut set = f();
timed(&mut self.random_ints, move || {
timed(&mut self.random_ints, || {
for _ in range(0, num_keys) {
set.insert(rng.gen::<uint>() % rand_cap);
}
......@@ -94,7 +94,7 @@ pub fn bench_int<T:MutableSet<uint>,
set.insert(i);
}
timed(&mut self.delete_ints, move || {
timed(&mut self.delete_ints, || {
for i in range(0u, num_keys) {
assert!(set.remove(&i));
}
......@@ -110,7 +110,7 @@ pub fn bench_str<T:MutableSet<String>,
f: || -> T) {
{
let mut set = f();
timed(&mut self.sequential_strings, move || {
timed(&mut self.sequential_strings, || {
for i in range(0u, num_keys) {
set.insert(i.to_string());
}
......@@ -123,7 +123,7 @@ pub fn bench_str<T:MutableSet<String>,
{
let mut set = f();
timed(&mut self.random_strings, move || {
timed(&mut self.random_strings, || {
for _ in range(0, num_keys) {
let s = rng.gen::<uint>().to_string();
set.insert(s);
......@@ -136,7 +136,7 @@ pub fn bench_str<T:MutableSet<String>,
for i in range(0u, num_keys) {
set.insert(i.to_string());
}
timed(&mut self.delete_strings, move || {
timed(&mut self.delete_strings, || {
for i in range(0u, num_keys) {
assert!(set.remove(&i.to_string()));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册