Skip to content

Commit 40130d8

Browse files
committed
fmt + clippy
1 parent 3bcbdd3 commit 40130d8

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

crates/usfm3/src/vref.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,7 @@ pub fn to_vref_map(doc: &Document) -> serde_json::Map<String, serde_json::Value>
152152
&& !appended_visible_text
153153
&& starts_boundary_separated_content(&fragment)
154154
&& !ends_with_tight_joiner(&current_text);
155-
append_vref_text(
156-
&mut current_text,
157-
&fragment,
158-
needs_boundary_space,
159-
);
155+
append_vref_text(&mut current_text, &fragment, needs_boundary_space);
160156
appended_visible_text = true;
161157
}
162158
}

crates/usfm3/tests/integration.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,9 @@ fn verse_continuation_paragraphs_restore_word_boundaries_in_vref() {
709709
let vref = parse_to_vref(usfm);
710710
assert_eq!(
711711
vref.get("LUK 1:48").and_then(|v| v.as_str()),
712-
Some("for he has been mindful of the humble state of his servant. From now on all generations will call me blessed,")
712+
Some(
713+
"for he has been mindful of the humble state of his servant. From now on all generations will call me blessed,"
714+
)
713715
);
714716
assert_eq!(
715717
vref.get("LUK 1:49").and_then(|v| v.as_str()),
@@ -730,7 +732,9 @@ fn quoted_poetry_continuations_restore_word_boundaries_in_vref() {
730732
let vref = parse_to_vref(usfm);
731733
assert_eq!(
732734
vref.get("LUK 4:10").and_then(|v| v.as_str()),
733-
Some("For it is written: “‘He will command his angels concerning you to guard you carefully;")
735+
Some(
736+
"For it is written: “‘He will command his angels concerning you to guard you carefully;"
737+
)
734738
);
735739
}
736740

@@ -750,11 +754,15 @@ fn poetry_continuations_preserve_spaces_around_quotes_in_vref() {
750754
let vref = parse_to_vref(usfm);
751755
assert_eq!(
752756
vref.get("MRK 1:2").and_then(|v| v.as_str()),
753-
Some("As it is written in Isaiah the prophet, “Behold, I send my messenger before your face. He will prepare your way.")
757+
Some(
758+
"As it is written in Isaiah the prophet, “Behold, I send my messenger before your face. He will prepare your way."
759+
)
754760
);
755761
assert_eq!(
756762
vref.get("MRK 1:3").and_then(|v| v.as_str()),
757-
Some("A voice cries in the wilderness, ‘Prepare the way of the Lord, make his paths straight.’”")
763+
Some(
764+
"A voice cries in the wilderness, ‘Prepare the way of the Lord, make his paths straight.’”"
765+
)
758766
);
759767
}
760768

@@ -769,7 +777,9 @@ fn paragraph_continuations_restore_sentence_break_spaces_in_vref() {
769777
let vref = parse_to_vref(usfm);
770778
assert_eq!(
771779
vref.get("MRK 5:40").and_then(|v| v.as_str()),
772-
Some("And they laughed at him. He put them all outside and took the child's father and mother and those who were with him into the room.")
780+
Some(
781+
"And they laughed at him. He put them all outside and took the child's father and mother and those who were with him into the room."
782+
)
773783
);
774784
}
775785

0 commit comments

Comments
 (0)