From 5d12cd80b11bfb9985fe2f4e52a44d0f2238c4bb Mon Sep 17 00:00:00 2001 From: Lise Henry Date: Mon, 7 Aug 2023 14:25:43 +0200 Subject: [PATCH] Remove proofread-related code --- src/lib/book.rs | 175 +----------------------------------------------- 1 file changed, 1 insertion(+), 174 deletions(-) diff --git a/src/lib/book.rs b/src/lib/book.rs index ae0b39a..a62e7d5 100644 --- a/src/lib/book.rs +++ b/src/lib/book.rs @@ -1,4 +1,4 @@ -// Copyright (C) 2016, 2017, 2018 Élisabeth HENRY. +// Copyright (C) 2016-2023 Élisabeth HENRY. // // This file is part of Crowbook. // @@ -29,8 +29,6 @@ use crate::lang; use crate::latex::{Latex, Pdf, ProofLatex, ProofPdf}; use crate::misc; use crate::number::Number; -#[cfg(feature = "odt")] -use crate::odt::Odt; use crate::parser::Features; use crate::parser::Parser; use crate::resource_handler::ResourceHandler; @@ -38,40 +36,6 @@ use crate::templates::{epub, epub3, highlight, html, html_dir, html_if, html_sin use crate::text_view::view_as_text; use crate::token::Token; -#[cfg(feature = "proofread")] -use crate::grammalecte::GrammalecteChecker; -#[cfg(feature = "proofread")] -use crate::grammar_check::GrammarChecker; -#[cfg(feature = "proofread")] -use crate::repetition_check::RepetitionDetector; -// Dummy grammarchecker thas does nothing to let the compiler compile -#[cfg(not(feature = "proofread"))] -struct GrammarChecker {} -#[cfg(not(feature = "proofread"))] -impl GrammarChecker { - fn check_chapter(&self, _: &[Token]) -> Result<()> { - Ok(()) - } -} -// Dummy grammalectechecker thas does nothing to let the compiler compile -#[cfg(not(feature = "proofread"))] -struct GrammalecteChecker {} -#[cfg(not(feature = "proofread"))] -impl GrammalecteChecker { - fn check_chapter(&self, _: &[Token]) -> Result<()> { - Ok(()) - } -} -// Dummy RepetitionDetector thas does nothing to let the compiler compile -#[cfg(not(feature = "proofread"))] -struct RepetitionDetector {} -#[cfg(not(feature = "proofread"))] -impl RepetitionDetector { - fn check_chapter(&self, _: &[Token]) -> Result<()> { - Ok(()) - } -} - use std::borrow::Cow; use std::cmp::Ordering; use std::collections::HashMap; @@ -179,9 +143,6 @@ pub struct Book { cleaner: Box, chapter_template: Option