mirror of
https://github.com/servo/servo.git
synced 2025-07-01 04:23:39 +01:00
stylo: Add uses of fallible Vec, SmallVec and HashMap facilities.
Bug: 1395064 Reviewed-by: emilio
This commit is contained in:
parent
815fb6b058
commit
c85633f48e
10 changed files with 125 additions and 57 deletions
|
@ -33,6 +33,12 @@ pub struct FailedAllocationError {
|
|||
reason: &'static str,
|
||||
}
|
||||
|
||||
impl FailedAllocationError {
|
||||
pub fn new(reason: &'static str) -> Self {
|
||||
Self { reason }
|
||||
}
|
||||
}
|
||||
|
||||
impl error::Error for FailedAllocationError {
|
||||
fn description(&self) -> &str {
|
||||
self.reason
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue