diff --git a/src/document.rs b/src/document.rs index cfa1318..4a1ba1e 100644 --- a/src/document.rs +++ b/src/document.rs @@ -62,7 +62,7 @@ impl RtfDocument { return Self::try_from(file_content); } - /// Get the raw text of an RTF docuement + /// Get the raw text of an RTF document pub fn get_text(&self) -> String { let mut result = String::new(); for style_block in &self.body { diff --git a/src/header.rs b/src/header.rs index 98d7ce3..7f5c6af 100644 --- a/src/header.rs +++ b/src/header.rs @@ -38,7 +38,7 @@ pub struct Style { /// Information about the document, including references to fonts & styles #[derive(Default, Debug, Clone, PartialEq)] #[cfg_attr(feature = "serde", derive(Deserialize, Serialize, Tsify))] -#[cfg_attr(all(feature = "serde", target_arch = "wasm32"), tsify(into_wasm_abi, from_wasm_abi))] +#[cfg_attr(all(feature = "serde"), tsify(into_wasm_abi, from_wasm_abi))] pub struct RtfHeader { pub character_set: CharacterSet, pub font_table: FontTable, @@ -90,7 +90,7 @@ impl CharacterSet { #[allow(dead_code)] #[derive(Debug, PartialEq, Hash, Clone, Default)] #[cfg_attr(feature = "serde", derive(Deserialize, Serialize, Tsify))] -#[cfg_attr(all(feature = "serde", target_arch = "wasm32"), tsify(into_wasm_abi, from_wasm_abi))] +#[cfg_attr(all(feature = "serde"), tsify(into_wasm_abi, from_wasm_abi))] pub enum FontFamily { #[default] Nil, diff --git a/src/paragraph.rs b/src/paragraph.rs index dc03ef4..237c5a7 100644 --- a/src/paragraph.rs +++ b/src/paragraph.rs @@ -21,7 +21,7 @@ pub struct Paragraph { /// Alignement of a paragraph (left, right, center, justify) #[derive(Debug, Default, Clone, Copy, PartialEq, Hash)] #[cfg_attr(feature = "serde", derive(Deserialize, Serialize, Tsify))] -#[cfg_attr(all(feature = "serde", target_arch = "wasm32"), tsify(into_wasm_abi, from_wasm_abi))] +#[cfg_attr(all(feature = "serde"), tsify(into_wasm_abi, from_wasm_abi))] pub enum Alignment { #[default] LeftAligned, // \ql @@ -55,7 +55,7 @@ pub struct Spacing { #[derive(Default, Debug, Clone, Copy, PartialEq, Hash)] #[cfg_attr(feature = "serde", derive(Deserialize, Serialize, Tsify))] -#[cfg_attr(all(feature = "serde", target_arch = "wasm32"), tsify(into_wasm_abi, from_wasm_abi))] +#[cfg_attr(all(feature = "serde"), tsify(into_wasm_abi, from_wasm_abi))] pub enum SpaceBetweenLine { Value(i32), #[default] diff --git a/src/parser.rs b/src/parser.rs index cc010d3..c67c9e5 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -738,7 +738,7 @@ pub mod tests { fn body_starts_with_a_group() { let rtf = r"{\rtf1\ansi\deff0{\fonttbl {\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset2 Symbol;}}{\colortbl ;}{\pard \u21435 \sb70\par}}"; let tokens = Lexer::scan(rtf).unwrap(); - let document = Parser::new(tokens).parse().unwrap(); + let _document = Parser::new(tokens).parse().unwrap(); } #[test]