style: Remove servo/components/{hashglobe,fallible} in favor of try_reserve

Differential Revision: https://phabricator.services.mozilla.com/D134194
This commit is contained in:
Emilio Cobos Álvarez 2023-06-06 18:07:21 +02:00 committed by Oriol Brufau
parent 07d1bd560b
commit 2b6fce1e57
33 changed files with 157 additions and 7113 deletions

View file

@ -97,7 +97,6 @@ pub mod font_metrics;
#[allow(unsafe_code)]
pub mod gecko_bindings;
pub mod global_style_data;
pub mod hash;
pub mod invalidation;
#[allow(missing_docs)] // TODO.
pub mod logical_geometry;
@ -263,3 +262,27 @@ where
*self == One::one()
}
}
/// An allocation error.
///
/// TODO(emilio): Would be nice to have more information here, or for SmallVec
/// to return the standard error type (and then we can just return that).
///
/// But given we use these mostly to bail out and ignore them, it's not a big
/// deal.
#[derive(Debug)]
pub struct AllocErr;
impl From<smallvec::CollectionAllocErr> for AllocErr {
#[inline]
fn from(_: smallvec::CollectionAllocErr) -> Self {
Self
}
}
impl From<std::collections::TryReserveError> for AllocErr {
#[inline]
fn from(_: std::collections::TryReserveError) -> Self {
Self
}
}