Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
d0rianb committed Sep 16, 2024
1 parent 50e0d2f commit 459e67a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/paragraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 459e67a

Please sign in to comment.