Skip to content

Commit 4d8c059

Browse files
committed
Enable bumpalo/allocator-api2 in dev-dependencies for doc-tests
1 parent bceae1e commit 4d8c059

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ rayon = "1.0"
3636
fnv = "1.0.7"
3737
serde_test = "1.0"
3838
doc-comment = "0.3.1"
39-
bumpalo = "3.6.0"
39+
bumpalo = { version = "3.13.0", features = ["allocator-api2"] }
4040
rkyv = { version = "0.7.42", features = ["validation"] }
4141

4242
[features]

src/map.rs

-14
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,6 @@ impl<K, V, A: Allocator + Clone> HashMap<K, V, DefaultHashBuilder, A> {
345345
/// # Examples
346346
///
347347
/// ```
348-
/// # #[cfg(feature = "nightly")]
349-
/// # fn test() {
350348
/// use hashbrown::HashMap;
351349
/// use bumpalo::Bump;
352350
///
@@ -365,11 +363,6 @@ impl<K, V, A: Allocator + Clone> HashMap<K, V, DefaultHashBuilder, A> {
365363
/// assert_eq!(map.len(), 1);
366364
/// // And it also allocates some capacity
367365
/// assert!(map.capacity() > 1);
368-
/// # }
369-
/// # fn main() {
370-
/// # #[cfg(feature = "nightly")]
371-
/// # test()
372-
/// # }
373366
/// ```
374367
#[cfg_attr(feature = "inline-more", inline)]
375368
pub fn new_in(alloc: A) -> Self {
@@ -396,8 +389,6 @@ impl<K, V, A: Allocator + Clone> HashMap<K, V, DefaultHashBuilder, A> {
396389
/// # Examples
397390
///
398391
/// ```
399-
/// # #[cfg(feature = "nightly")]
400-
/// # fn test() {
401392
/// use hashbrown::HashMap;
402393
/// use bumpalo::Bump;
403394
///
@@ -421,11 +412,6 @@ impl<K, V, A: Allocator + Clone> HashMap<K, V, DefaultHashBuilder, A> {
421412
/// assert_eq!(map.len(), 5);
422413
/// // But its capacity isn't changed
423414
/// assert_eq!(map.capacity(), empty_map_capacity)
424-
/// # }
425-
/// # fn main() {
426-
/// # #[cfg(feature = "nightly")]
427-
/// # test()
428-
/// # }
429415
/// ```
430416
#[cfg_attr(feature = "inline-more", inline)]
431417
pub fn with_capacity_in(capacity: usize, alloc: A) -> Self {

0 commit comments

Comments
 (0)