Skip to content

Commit

Permalink
Use collect::<Box<[_]>>() directly in ShardedLock::new()
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 6, 2020
1 parent a1b9bf3 commit 6877244
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crossbeam-utils/src/sync/sharded_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ impl<T> ShardedLock<T> {
write_guard: UnsafeCell::new(None),
})
})
.collect::<Vec<_>>()
.into_boxed_slice(),
.collect::<Box<[_]>>(),
value: UnsafeCell::new(value),
}
}
Expand Down

0 comments on commit 6877244

Please sign in to comment.