Skip to content

Commit 06b3482

Browse files
authoredSep 25, 2023
fix(clippy): Add missing semicolons where nothing is returned. (#293)
1 parent 1f448e4 commit 06b3482

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed
 

‎src/handlers/graphical.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,10 @@ impl GraphicalReportHandler {
678678
for (c, width) in text.chars().zip(self.line_visual_char_width(text)) {
679679
if c == '\t' {
680680
for _ in 0..width {
681-
f.write_char(' ')?
681+
f.write_char(' ')?;
682682
}
683683
} else {
684-
f.write_char(c)?
684+
f.write_char(c)?;
685685
}
686686
}
687687
f.write_char('\n')?;

‎src/handlers/json.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl JSONReportHandler {
9696
}
9797
write!(f, r#""{}""#, escape(&error.to_string()))?;
9898
}
99-
write!(f, "],")?
99+
write!(f, "],")?;
100100
} else {
101101
write!(f, r#""causes": [],"#)?;
102102
}

‎src/protocol.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ fn test_serialize_labeled_span() {
379379
"span": { "offset": 0, "length": 0, },
380380
"primary": false,
381381
})
382-
)
382+
);
383383
}
384384

385385
#[cfg(feature = "serde")]
@@ -408,7 +408,7 @@ fn test_deserialize_labeled_span() {
408408
"primary": false
409409
}))
410410
.unwrap();
411-
assert_eq!(span, LabeledSpan::new(Some("label".to_string()), 0, 0))
411+
assert_eq!(span, LabeledSpan::new(Some("label".to_string()), 0, 0));
412412
}
413413

414414
/**
@@ -597,7 +597,7 @@ fn test_serialize_source_span() {
597597
assert_eq!(
598598
json!(SourceSpan::from(0)),
599599
json!({ "offset": 0, "length": 0})
600-
)
600+
);
601601
}
602602

603603
#[cfg(feature = "serde")]
@@ -606,7 +606,7 @@ fn test_deserialize_source_span() {
606606
use serde_json::json;
607607

608608
let span: SourceSpan = serde_json::from_value(json!({ "offset": 0, "length": 0})).unwrap();
609-
assert_eq!(span, SourceSpan::from(0))
609+
assert_eq!(span, SourceSpan::from(0));
610610
}
611611

612612
/**
@@ -708,12 +708,12 @@ fn test_source_offset_from_location() {
708708
fn test_serialize_source_offset() {
709709
use serde_json::json;
710710

711-
assert_eq!(json!(SourceOffset::from(0)), 0)
711+
assert_eq!(json!(SourceOffset::from(0)), 0);
712712
}
713713

714714
#[cfg(feature = "serde")]
715715
#[test]
716716
fn test_deserialize_source_offset() {
717717
let offset: SourceOffset = serde_json::from_str("0").unwrap();
718-
assert_eq!(offset, SourceOffset::from(0))
718+
assert_eq!(offset, SourceOffset::from(0));
719719
}

‎tests/derive.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ fn test_unit_struct_display() {
568568
#[error("unit only")]
569569
#[diagnostic(code(foo::bar::overridden), help("hello from unit help"))]
570570
struct UnitOnly;
571-
assert_eq!(UnitOnly.help().unwrap().to_string(), "hello from unit help")
571+
assert_eq!(UnitOnly.help().unwrap().to_string(), "hello from unit help");
572572
}
573573

574574
#[test]
@@ -582,5 +582,5 @@ fn test_unit_enum_display() {
582582
assert_eq!(
583583
Enum::UnitVariant.help().unwrap().to_string(),
584584
"hello from unit help"
585-
)
585+
);
586586
}

0 commit comments

Comments
 (0)
Please sign in to comment.