diff --git a/src/parser/pff2.rs b/src/parser/pff2.rs index 7cab8a8..f1a4712 100644 --- a/src/parser/pff2.rs +++ b/src/parser/pff2.rs @@ -13,7 +13,7 @@ //! ``` use core::fmt::Debug; -use std::{marker::PhantomData, rc::Rc, string::FromUtf8Error}; +use std::{marker::PhantomData, string::FromUtf8Error}; use nom::{InputLength, ToUsize}; use thiserror::Error; @@ -209,7 +209,7 @@ impl Parser { /// Takes the glyph lookup section and combines it with the content of the data section to get the complete glyph /// data. [`CharIndex`] offsets are file-global (absolute), so `input` should be the entirety of the file. - fn parse_data_section(indexes: Vec, input: &[u8]) -> Rc<[Glyph]> { + fn parse_data_section(indexes: Vec, input: &[u8]) -> OwnedSlice<[Glyph]> { let mut glyphs = Vec::with_capacity(indexes.len()); for index in indexes { diff --git a/src/render/pff2.rs b/src/render/pff2.rs index 4eba743..1699ef0 100644 --- a/src/render/pff2.rs +++ b/src/render/pff2.rs @@ -66,10 +66,8 @@ impl Bitmap { (width * height + 7) / 8 } - /// Constructs self by wrapping the bitmap slice in a [`Rc`] and verifying that it's length is exactly + /// Constructs self by wrapping the bitmap slice in a [`OwnedSlice`] and verifying that it's length is exactly /// [`Self::byte_count_from_size`]. - /// - /// [`Rc`]: std::rc::Rc pub fn new(width: usize, height: usize, bitmap: &[u8]) -> Option { if bitmap.len() != Self::byte_count_from_size(width, height) { return None;