diff options
| author | bors <bors@rust-lang.org> | 2018-04-29 09:22:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-04-29 09:22:10 +0000 |
| commit | 87d3250445725d9696a722f67237f6e34f32e87e (patch) | |
| tree | 5034e8c5b351a0c1199b405791ca381e3934ab43 /src/libstd | |
| parent | f76f6fbdea497c3cb536e33387f405cc74b99b76 (diff) | |
| parent | c1bb1caa11ba30b42f62b58f74e530288779eb85 (diff) | |
| download | rust-87d3250445725d9696a722f67237f6e34f32e87e.tar.gz rust-87d3250445725d9696a722f67237f6e34f32e87e.zip | |
Auto merge of #50306 - alexcrichton:inline-policy, r=sfackler
std: Inline `DefaultResizePolicy::new` This should allow us to tighten up the [codegen][example] a bit more, avoiding a function call across object boundaries in the default optimized case. [example]: https://play.rust-lang.org/?gist=c1179088b0f8a4dcd93a9906463f993d&version=stable&mode=release
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index a8c70489f44..a7eb002d5a1 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -33,6 +33,7 @@ const MIN_NONZERO_RAW_CAPACITY: usize = 32; // must be a power of two struct DefaultResizePolicy; impl DefaultResizePolicy { + #[inline] fn new() -> DefaultResizePolicy { DefaultResizePolicy } |
