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
This commit is contained in:
@@ -33,6 +33,7 @@ const MIN_NONZERO_RAW_CAPACITY: usize = 32; // must be a power of two
|
|||||||
struct DefaultResizePolicy;
|
struct DefaultResizePolicy;
|
||||||
|
|
||||||
impl DefaultResizePolicy {
|
impl DefaultResizePolicy {
|
||||||
|
#[inline]
|
||||||
fn new() -> DefaultResizePolicy {
|
fn new() -> DefaultResizePolicy {
|
||||||
DefaultResizePolicy
|
DefaultResizePolicy
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user