oxc_allocator 0.140.0

A collection of JavaScript tools written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::Allocator;

/// Accessor for getting the underlying allocator.
pub trait GetAllocator<'a> {
    /// Get the underlying allocator.
    fn allocator(&self) -> &'a Allocator;
}

impl<'a> GetAllocator<'a> for &'a Allocator {
    #[inline]
    fn allocator(&self) -> &'a Allocator {
        self
    }
}