Skip to content

Commit

Permalink
Merge pull request #47 from aidanbabo/master
Browse files Browse the repository at this point in the history
Arena doc fixes
  • Loading branch information
droundy authored Jun 22, 2024
2 parents a3425c2 + e560aac commit eaf94b1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl Arena<std::ffi::CStr> {
/// Intern a `Box<CStr>` as `ArenaIntern<CStr>`.
///
/// If this value has not previously been interned, then `intern` will save
/// the provided `Box<CSr>`. Otherwise, it will free its input `Box<CStr>`
/// the provided `Box<CStr>`. Otherwise, it will free its input `Box<CStr>`
/// and return a pointer to the `CStr` previously saved.
///
/// # Example
Expand Down Expand Up @@ -261,7 +261,7 @@ impl Arena<std::ffi::OsStr> {
/// Intern a `Box<OsStr>` as `ArenaIntern<OsStr>`.
///
/// If this value has not previously been interned, then `intern` will save
/// the provided `Box<CSr>`. Otherwise, it will free its input `Box<OsStr>`
/// the provided `Box<OsStr>`. Otherwise, it will free its input `Box<OsStr>`
/// and return a pointer to the `OsStr` previously saved.
///
/// # Example
Expand Down Expand Up @@ -314,7 +314,7 @@ impl Arena<std::path::Path> {
/// Intern a `Box<Path>` as `ArenaIntern<Path>`.
///
/// If this value has not previously been interned, then `intern` will save
/// the provided `Box<CSr>`. Otherwise, it will free its input `Box<Path>`
/// the provided `Box<Path>`. Otherwise, it will free its input `Box<Path>`
/// and return a pointer to the `Path` previously saved.
///
/// # Example
Expand All @@ -330,11 +330,11 @@ impl Arena<std::path::Path> {
}
}
impl<T: Eq + Hash + Copy> Arena<[T]> {
/// Intern a `&\[T\]` as `ArenaIntern<[T]>`.
/// Intern a `&[T]` as `ArenaIntern<[T]>`.
///
/// If this value has not previously been interned, then `intern` will
/// allocate a spot for the value on the heap. Otherwise, it will return a
/// pointer to the `\[T\]` previously allocated.
/// pointer to the `[T]` previously allocated.
pub fn intern<'a, 'b>(&'a self, val: &'b [T]) -> ArenaIntern<'a, [T]> {
self.intern_ref(val)
}
Expand Down

0 comments on commit eaf94b1

Please sign in to comment.