Skip to content

Commit 02abe19

Browse files
committed
Formatting
1 parent 3141401 commit 02abe19

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"cSpell.ignoreRegExpList": [
3+
"\\b[A-Z]{4}\\b" // ignore GEDCOM tags
4+
],
25
"cSpell.words": [
36
"ANSEL",
47
"GEDCOM",

snippets/src/lib.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,7 @@ pub struct Label<'a> {
5050

5151
impl<'a> Label<'a> {
5252
pub fn new(span: Span<u8>, message: Cow<'a, str>, style: Style) -> Self {
53-
Self {
54-
span,
55-
message,
56-
style,
57-
is_multiline_end: false,
58-
}
53+
Self { span, message, style, is_multiline_end: false }
5954
}
6055

6156
pub fn with_style(self, style: Style) -> Self {
@@ -229,11 +224,8 @@ impl Highlighter<'_> {
229224
);
230225

231226
// indicate the portion of the line that the labels are pointing at
232-
let LitLine {
233-
line,
234-
indicator_line,
235-
messages,
236-
} = LineHighlighter::new(self.source_code).highlight_line(line_span, &line_labels);
227+
let LitLine { line, indicator_line, messages } =
228+
LineHighlighter::new(self.source_code).highlight_line(line_span, &line_labels);
237229

238230
// 0. context-before
239231
// 1. line
@@ -630,7 +622,7 @@ mod test {
630622
use insta::assert_snapshot;
631623
use owo_colors::Style;
632624

633-
use super::{render, sort_labels, Label};
625+
use super::{Label, render, sort_labels};
634626

635627
fn span_of(source: &str, word: &str) -> Span<u8> {
636628
let start = source.find(word).unwrap();

0 commit comments

Comments
 (0)