hashglobe: Inline error constructor so we don't pay a function call even when there's no error.

This commit is contained in:
Emilio Cobos Álvarez 2017-09-10 16:57:09 +02:00
parent 6661bfa838
commit 7a6b891a29
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -34,6 +34,7 @@ pub struct FailedAllocationError {
}
impl FailedAllocationError {
#[inline]
pub fn new(reason: &'static str) -> Self {
Self { reason }
}