Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// use std::thread;
///
/// fn main() {
/// let numbers: Vec<_> = (0..100u32).collect();
/// let numbers: Vec<_> = (0..100).collect();
/// let shared_numbers = Arc::new(numbers);
///
/// for _ in 0..10 {
Expand Down Expand Up @@ -1118,7 +1118,7 @@ mod tests {

#[test]
fn test_strong_count() {
let a = Arc::new(0u32);
let a = Arc::new(0);
assert!(Arc::strong_count(&a) == 1);
let w = Arc::downgrade(&a);
assert!(Arc::strong_count(&a) == 1);
Expand All @@ -1135,7 +1135,7 @@ mod tests {

#[test]
fn test_weak_count() {
let a = Arc::new(0u32);
let a = Arc::new(0);
assert!(Arc::strong_count(&a) == 1);
assert!(Arc::weak_count(&a) == 0);
let w = Arc::downgrade(&a);
Expand All @@ -1161,7 +1161,7 @@ mod tests {

#[test]
fn show_arc() {
let a = Arc::new(5u32);
let a = Arc::new(5);
assert_eq!(format!("{:?}", a), "5");
}

Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ mod tests {

#[test]
fn test_strong_count() {
let a = Rc::new(0u32);
let a = Rc::new(0);
assert!(Rc::strong_count(&a) == 1);
let w = Rc::downgrade(&a);
assert!(Rc::strong_count(&a) == 1);
Expand All @@ -1031,7 +1031,7 @@ mod tests {

#[test]
fn test_weak_count() {
let a = Rc::new(0u32);
let a = Rc::new(0);
assert!(Rc::strong_count(&a) == 1);
assert!(Rc::weak_count(&a) == 0);
let w = Rc::downgrade(&a);
Expand Down
16 changes: 8 additions & 8 deletions src/libcollections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,10 +1305,10 @@ mod tests {
//
// https://github.com/rust-lang/rust/issues/26021
let mut v1 = LinkedList::new();
v1.push_front(1u8);
v1.push_front(1u8);
v1.push_front(1u8);
v1.push_front(1u8);
v1.push_front(1);
v1.push_front(1);
v1.push_front(1);
v1.push_front(1);
let _ = v1.split_off(3); // Dropping this now should not cause laundry consumption
assert_eq!(v1.len(), 3);

Expand All @@ -1319,10 +1319,10 @@ mod tests {
#[test]
fn test_split_off() {
let mut v1 = LinkedList::new();
v1.push_front(1u8);
v1.push_front(1u8);
v1.push_front(1u8);
v1.push_front(1u8);
v1.push_front(1);
v1.push_front(1);
v1.push_front(1);
v1.push_front(1);

// test all splits
for ix in 0..1 + v1.len() {
Expand Down
8 changes: 4 additions & 4 deletions src/libcollectionstest/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ fn test_swap_remove_fail() {
fn test_swap_remove_noncopyable() {
// Tests that we don't accidentally run destructors twice.
let mut v: Vec<Box<_>> = Vec::new();
v.push(box 0u8);
v.push(box 0u8);
v.push(box 0u8);
v.push(box 0);
v.push(box 0);
v.push(box 0);
let mut _e = v.swap_remove(0);
assert_eq!(v.len(), 2);
_e = v.swap_remove(1);
Expand Down Expand Up @@ -896,7 +896,7 @@ fn test_overflow_does_not_cause_segfault_managed() {

#[test]
fn test_mut_split_at() {
let mut values = [1u8,2,3,4,5];
let mut values = [1,2,3,4,5];
{
let (left, right) = values.split_at_mut(2);
{
Expand Down