@@ -12,7 +12,7 @@ use hash32::{BuildHasherDefault, FnvHasher};
12
12
13
13
use crate :: Vec ;
14
14
15
- /// A [`IndexMap`] using the default FNV hasher
15
+ /// An [`IndexMap`] using the default FNV hasher.
16
16
///
17
17
/// A list of all Methods and Traits available for `FnvIndexMap` can be found in
18
18
/// the [`IndexMap`] documentation.
@@ -681,7 +681,7 @@ impl<K, V, S, const N: usize> IndexMap<K, V, S, N> {
681
681
682
682
/// Get the first key-value pair
683
683
///
684
- /// Computes in **O (1)** time
684
+ /// Computes in *O* (1) time
685
685
pub fn first ( & self ) -> Option < ( & K , & V ) > {
686
686
self . core
687
687
. entries
@@ -691,7 +691,7 @@ impl<K, V, S, const N: usize> IndexMap<K, V, S, N> {
691
691
692
692
/// Get the first key-value pair, with mutable access to the value
693
693
///
694
- /// Computes in **O (1)** time
694
+ /// Computes in *O* (1) time
695
695
pub fn first_mut ( & mut self ) -> Option < ( & K , & mut V ) > {
696
696
self . core
697
697
. entries
@@ -701,7 +701,7 @@ impl<K, V, S, const N: usize> IndexMap<K, V, S, N> {
701
701
702
702
/// Get the last key-value pair
703
703
///
704
- /// Computes in **O (1)** time
704
+ /// Computes in *O* (1) time
705
705
pub fn last ( & self ) -> Option < ( & K , & V ) > {
706
706
self . core
707
707
. entries
@@ -711,7 +711,7 @@ impl<K, V, S, const N: usize> IndexMap<K, V, S, N> {
711
711
712
712
/// Get the last key-value pair, with mutable access to the value
713
713
///
714
- /// Computes in **O (1)** time
714
+ /// Computes in *O* (1) time
715
715
pub fn last_mut ( & mut self ) -> Option < ( & K , & mut V ) > {
716
716
self . core
717
717
. entries
@@ -721,7 +721,7 @@ impl<K, V, S, const N: usize> IndexMap<K, V, S, N> {
721
721
722
722
/// Return the number of key-value pairs in the map.
723
723
///
724
- /// Computes in **O (1)** time.
724
+ /// Computes in *O* (1) time.
725
725
///
726
726
/// ```
727
727
/// use heapless::FnvIndexMap;
@@ -737,7 +737,7 @@ impl<K, V, S, const N: usize> IndexMap<K, V, S, N> {
737
737
738
738
/// Returns true if the map contains no elements.
739
739
///
740
- /// Computes in **O (1)** time.
740
+ /// Computes in *O* (1) time.
741
741
///
742
742
/// ```
743
743
/// use heapless::FnvIndexMap;
@@ -753,7 +753,7 @@ impl<K, V, S, const N: usize> IndexMap<K, V, S, N> {
753
753
754
754
/// Remove all key-value pairs in the map, while preserving its capacity.
755
755
///
756
- /// Computes in **O (n)** time.
756
+ /// Computes in *O* (n) time.
757
757
///
758
758
/// ```
759
759
/// use heapless::FnvIndexMap;
@@ -815,7 +815,7 @@ where
815
815
/// The key may be any borrowed form of the map's key type, but `Hash` and `Eq` on the borrowed
816
816
/// form *must* match those for the key type.
817
817
///
818
- /// Computes in **O (1)** time (average).
818
+ /// Computes in *O* (1) time (average).
819
819
///
820
820
/// ```
821
821
/// use heapless::FnvIndexMap;
@@ -839,7 +839,7 @@ where
839
839
/// The key may be any borrowed form of the map's key type, but `Hash` and `Eq` on the borrowed
840
840
/// form *must* match those for the key type.
841
841
///
842
- /// Computes in **O (1)** time (average).
842
+ /// Computes in *O* (1) time (average).
843
843
///
844
844
/// # Examples
845
845
///
@@ -864,7 +864,7 @@ where
864
864
/// The key may be any borrowed form of the map's key type, but `Hash` and `Eq` on the borrowed
865
865
/// form *must* match those for the key type.
866
866
///
867
- /// Computes in **O (1)** time (average).
867
+ /// Computes in *O* (1) time (average).
868
868
///
869
869
/// # Examples
870
870
///
@@ -899,7 +899,7 @@ where
899
899
/// If no equivalent key existed in the map: the new key-value pair is inserted, last in order,
900
900
/// and `None` is returned.
901
901
///
902
- /// Computes in **O (1)** time (average).
902
+ /// Computes in *O* (1) time (average).
903
903
///
904
904
/// See also entry if you you want to insert or modify or if you need to get the index of the
905
905
/// corresponding key-value pair.
@@ -927,7 +927,7 @@ where
927
927
928
928
/// Same as [`swap_remove`](Self::swap_remove)
929
929
///
930
- /// Computes in **O (1)** time (average).
930
+ /// Computes in *O* (1) time (average).
931
931
///
932
932
/// # Examples
933
933
///
@@ -954,7 +954,7 @@ where
954
954
///
955
955
/// Return `None` if `key` is not in map.
956
956
///
957
- /// Computes in **O (1)** time (average).
957
+ /// Computes in *O* (1) time (average).
958
958
pub fn swap_remove < Q > ( & mut self , key : & Q ) -> Option < V >
959
959
where
960
960
K : Borrow < Q > ,
0 commit comments