Skip to content

Commit

Permalink
fix spelling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLocal committed Apr 16, 2024
1 parent d60f221 commit 21a5feb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/extract_txt_with_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ fn main() {
}

struct PagePlainTextOutput {
inner: PlainTextOutput<OutputWarpper>,
inner: PlainTextOutput<OutputWrapper>,
pages: HashMap<u32, String>,
current_page: u32,
reader: Rc<RefCell<String>>,
}

struct OutputWarpper(Rc<RefCell<String>>);
struct OutputWrapper(Rc<RefCell<String>>);

impl std::fmt::Write for OutputWarpper {
impl std::fmt::Write for OutputWrapper {
fn write_str(&mut self, s: &str) -> std::fmt::Result {
self.0.borrow_mut().write_str(s).map_err(|_| fmt::Error)
}
}

impl ConvertToFmt for OutputWarpper {
type Writer = OutputWarpper;
impl ConvertToFmt for OutputWrapper {
type Writer = OutputWrapper;

fn convert(self) -> Self::Writer {
self
Expand All @@ -46,7 +46,7 @@ impl PagePlainTextOutput {
pages: HashMap::new(),
current_page: 0,
reader: s,
inner: PlainTextOutput::new(OutputWarpper(writer)),
inner: PlainTextOutput::new(OutputWrapper(writer)),
}
}
}
Expand Down

0 comments on commit 21a5feb

Please sign in to comment.