mirror of
https://github.com/servo/servo.git
synced 2025-07-02 21:13:39 +01:00
hashglobe: Inline error constructor so we don't pay a function call even when there's no error.
This commit is contained in:
parent
6661bfa838
commit
7a6b891a29
1 changed files with 1 additions and 0 deletions
|
@ -34,6 +34,7 @@ pub struct FailedAllocationError {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FailedAllocationError {
|
impl FailedAllocationError {
|
||||||
|
#[inline]
|
||||||
pub fn new(reason: &'static str) -> Self {
|
pub fn new(reason: &'static str) -> Self {
|
||||||
Self { reason }
|
Self { reason }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue