Add #[inline] to BTreeMap::new constructor
This commit is contained in:
parent
1547c076bf
commit
cc38c1e9cb
@ -624,6 +624,7 @@ impl<K, V> BTreeMap<K, V> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const_btree_new", since = "1.66.0")]
|
#[rustc_const_stable(feature = "const_btree_new", since = "1.66.0")]
|
||||||
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn new() -> BTreeMap<K, V> {
|
pub const fn new() -> BTreeMap<K, V> {
|
||||||
BTreeMap { root: None, length: 0, alloc: ManuallyDrop::new(Global), _marker: PhantomData }
|
BTreeMap { root: None, length: 0, alloc: ManuallyDrop::new(Global), _marker: PhantomData }
|
||||||
|
Loading…
Reference in New Issue
Block a user