about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-12-23 00:07:57 +0800
committerkennytm <kennytm@gmail.com>2018-12-23 02:12:20 +0800
commit5e727a43cb800d330cbbc6b9935963f1c1082bfc (patch)
tree4c31a122eebeb85497f77efcff063b188ceef710 /src/libstd
parent9b2331d2ca3c5348922211f309198af465fa23ff (diff)
parent4f30a24e42137149373311f20525ac52cff44d94 (diff)
downloadrust-5e727a43cb800d330cbbc6b9935963f1c1082bfc.tar.gz
rust-5e727a43cb800d330cbbc6b9935963f1c1082bfc.zip
Rollup merge of #57034 - Zoxc:query-perf8, r=michaelwoerister
Inline tweaks

r? @michaelwoerister
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/table.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index 479e6dccb90..7195175db28 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -740,6 +740,7 @@ impl<K, V> RawTable<K, V> {
         }
     }
 
+    #[inline]
     fn new_internal(
         capacity: usize,
         fallibility: Fallibility,
@@ -755,12 +756,14 @@ impl<K, V> RawTable<K, V> {
 
     /// Tries to create a new raw table from a given capacity. If it cannot allocate,
     /// it returns with AllocErr.
+    #[inline]
     pub fn try_new(capacity: usize) -> Result<RawTable<K, V>, CollectionAllocErr> {
         Self::new_internal(capacity, Fallible)
     }
 
     /// Creates a new raw table from a given capacity. All buckets are
     /// initially empty.
+    #[inline]
     pub fn new(capacity: usize) -> RawTable<K, V> {
         match Self::new_internal(capacity, Infallible) {
             Err(CollectionAllocErr::CapacityOverflow) => panic!("capacity overflow"),