mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
Remove some unnecessary move
keywords
This commit is contained in:
parent
745225d905
commit
6f28816f87
@ -68,7 +68,7 @@ impl Results {
|
|||||||
rand_cap: uint,
|
rand_cap: uint,
|
||||||
f: || -> T) { {
|
f: || -> T) { {
|
||||||
let mut set = f();
|
let mut set = f();
|
||||||
timed(&mut self.sequential_ints, move || {
|
timed(&mut self.sequential_ints, || {
|
||||||
for i in range(0u, num_keys) {
|
for i in range(0u, num_keys) {
|
||||||
set.insert(i);
|
set.insert(i);
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ impl Results {
|
|||||||
|
|
||||||
{
|
{
|
||||||
let mut set = f();
|
let mut set = f();
|
||||||
timed(&mut self.random_ints, move || {
|
timed(&mut self.random_ints, || {
|
||||||
for _ in range(0, num_keys) {
|
for _ in range(0, num_keys) {
|
||||||
set.insert(rng.gen::<uint>() % rand_cap);
|
set.insert(rng.gen::<uint>() % rand_cap);
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ impl Results {
|
|||||||
set.insert(i);
|
set.insert(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
timed(&mut self.delete_ints, move || {
|
timed(&mut self.delete_ints, || {
|
||||||
for i in range(0u, num_keys) {
|
for i in range(0u, num_keys) {
|
||||||
assert!(set.remove(&i));
|
assert!(set.remove(&i));
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ impl Results {
|
|||||||
f: || -> T) {
|
f: || -> T) {
|
||||||
{
|
{
|
||||||
let mut set = f();
|
let mut set = f();
|
||||||
timed(&mut self.sequential_strings, move || {
|
timed(&mut self.sequential_strings, || {
|
||||||
for i in range(0u, num_keys) {
|
for i in range(0u, num_keys) {
|
||||||
set.insert(i.to_string());
|
set.insert(i.to_string());
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ impl Results {
|
|||||||
|
|
||||||
{
|
{
|
||||||
let mut set = f();
|
let mut set = f();
|
||||||
timed(&mut self.random_strings, move || {
|
timed(&mut self.random_strings, || {
|
||||||
for _ in range(0, num_keys) {
|
for _ in range(0, num_keys) {
|
||||||
let s = rng.gen::<uint>().to_string();
|
let s = rng.gen::<uint>().to_string();
|
||||||
set.insert(s);
|
set.insert(s);
|
||||||
@ -136,7 +136,7 @@ impl Results {
|
|||||||
for i in range(0u, num_keys) {
|
for i in range(0u, num_keys) {
|
||||||
set.insert(i.to_string());
|
set.insert(i.to_string());
|
||||||
}
|
}
|
||||||
timed(&mut self.delete_strings, move || {
|
timed(&mut self.delete_strings, || {
|
||||||
for i in range(0u, num_keys) {
|
for i in range(0u, num_keys) {
|
||||||
assert!(set.remove(&i.to_string()));
|
assert!(set.remove(&i.to_string()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user