about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-03-31 09:19:29 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2021-03-31 09:19:29 +0200
commit5773e516787a90df4ed014cd20eed0226a1f63cd (patch)
treee79a2b3ad2a8d3547d2b7871919235898eb835aa /compiler/rustc_data_structures/src
parent8331dbe6d023a168334a7a46f15731c6bc1baf1e (diff)
downloadrust-5773e516787a90df4ed014cd20eed0226a1f63cd.tar.gz
rust-5773e516787a90df4ed014cd20eed0226a1f63cd.zip
Inline a few methods
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/memmap.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/memmap.rs b/compiler/rustc_data_structures/src/memmap.rs
index 0c24f227cc9..29e999efeb1 100644
--- a/compiler/rustc_data_structures/src/memmap.rs
+++ b/compiler/rustc_data_structures/src/memmap.rs
@@ -13,6 +13,7 @@ pub struct Mmap(Vec<u8>);
 
 #[cfg(not(target_arch = "wasm32"))]
 impl Mmap {
+    #[inline]
     pub unsafe fn map(file: File) -> io::Result<Self> {
         memmap2::Mmap::map(&file).map(Mmap)
     }
@@ -20,6 +21,7 @@ impl Mmap {
 
 #[cfg(target_arch = "wasm32")]
 impl Mmap {
+    #[inline]
     pub unsafe fn map(mut file: File) -> io::Result<Self> {
         use std::io::Read;
 
@@ -32,6 +34,7 @@ impl Mmap {
 impl Deref for Mmap {
     type Target = [u8];
 
+    #[inline]
     fn deref(&self) -> &[u8] {
         &*self.0
     }