diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:18:36 +0300 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:19:03 +0300 |
| commit | 377b0900aede976b2d37a499bbd7b62c2e39b358 (patch) | |
| tree | b4a5a4431d36ed1a4e0a39c7d2ef2563ecac9bf4 /src/libcollectionstest | |
| parent | 6e8e4f847c2ea02fec021ea15dfb2de6beac797a (diff) | |
| download | rust-377b0900aede976b2d37a499bbd7b62c2e39b358.tar.gz rust-377b0900aede976b2d37a499bbd7b62c2e39b358.zip | |
Use `const fn` to abstract away the contents of UnsafeCell & friends.
Diffstat (limited to 'src/libcollectionstest')
| -rw-r--r-- | src/libcollectionstest/vec.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollectionstest/vec.rs b/src/libcollectionstest/vec.rs index ac9cf198d67..b4d3d0b1a22 100644 --- a/src/libcollectionstest/vec.rs +++ b/src/libcollectionstest/vec.rs @@ -399,7 +399,7 @@ fn test_map_in_place_zero_sized() { #[test] fn test_map_in_place_zero_drop_count() { - use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; + use std::sync::atomic::{AtomicUsize, Ordering}; #[derive(Clone, PartialEq, Debug)] struct Nothing; @@ -413,7 +413,7 @@ fn test_map_in_place_zero_drop_count() { } } const NUM_ELEMENTS: usize = 2; - static DROP_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT; + static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0); let v = repeat(Nothing).take(NUM_ELEMENTS).collect::<Vec<_>>(); |
