Skip to main content

oxc_allocator/
accessor.rs

1use crate::Allocator;
2
3/// Accessor for getting the underlying allocator.
4pub trait GetAllocator<'a> {
5    /// Get the underlying allocator.
6    fn allocator(&self) -> &'a Allocator;
7}
8
9impl<'a> GetAllocator<'a> for &'a Allocator {
10    #[inline]
11    fn allocator(&self) -> &'a Allocator {
12        self
13    }
14}