Skip to content

Commit afab17f

Browse files
committed
Refactor code-style
1 parent 3e832c0 commit afab17f

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

generate/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ async fn punctuation() {
153153
/// ## References
154154
///
155155
/// * [*§ 2.1 Characters and lines* in `CommonMark`](https://spec.commonmark.org/0.31.2/#unicode-punctuation-character)
156-
pub const PUNCTUATION: [char; {}] = [
156+
pub static PUNCTUATION: [char; {}] = [
157157
{}
158158
];
159159
",

src/message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl fmt::Display for Message {
1717
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1818
if let Some(ref place) = self.place {
1919
write!(f, "{}: ", place)?;
20-
};
20+
}
2121

2222
write!(f, "{} ({}:{})", self.reason, self.source, self.rule_id)
2323
}

src/to_html.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ fn on_exit_media(context: &mut CompileContext) {
14481448
context.push("<img src=\"");
14491449
} else {
14501450
context.push("<a href=\"");
1451-
};
1451+
}
14521452

14531453
let destination = if let Some(index) = definition_index {
14541454
context.definitions[index].destination.as_ref()
@@ -1477,7 +1477,7 @@ fn on_exit_media(context: &mut CompileContext) {
14771477

14781478
if media.image {
14791479
context.push("\" alt=\"");
1480-
};
1480+
}
14811481
}
14821482

14831483
if media.image {
@@ -1497,7 +1497,7 @@ fn on_exit_media(context: &mut CompileContext) {
14971497
context.push(" title=\"");
14981498
context.push(&title);
14991499
context.push("\"");
1500-
};
1500+
}
15011501

15021502
if media.image {
15031503
context.push(" /");

src/tokenizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ fn push_impl(
756756

757757
tokenizer.expect(byte);
758758
state = call(tokenizer, name);
759-
};
759+
}
760760
}
761761
State::Retry(name) => {
762762
#[cfg(feature = "log")]

src/util/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ pub const THEMATIC_BREAK_MARKER_COUNT_MIN: usize = 3;
306306
/// * [*§ 2.5 Entity and numeric character references* in `CommonMark`](https://spec.commonmark.org/0.31/#entity-and-numeric-character-references)
307307
///
308308
/// [character_reference]: crate::construct::character_reference
309-
pub const CHARACTER_REFERENCES: [(&str, &str); 2125] = [
309+
pub static CHARACTER_REFERENCES: [(&str, &str); 2125] = [
310310
("AElig", "Æ"),
311311
("AMP", "&"),
312312
("Aacute", "Á"),

src/util/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl<'a> Slice<'a> {
7575
if before > 0 {
7676
before = TAB_SIZE - before;
7777
start += 1;
78-
};
78+
}
7979

8080
// If we have virtual spaces after, it means that character is included,
8181
// and one less virtual space.

src/util/unicode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/// ## References
1616
///
1717
/// * [*§ 2.1 Characters and lines* in `CommonMark`](https://spec.commonmark.org/0.31.2/#unicode-punctuation-character)
18-
pub const PUNCTUATION: [char; 8617] = [
18+
pub static PUNCTUATION: [char; 8617] = [
1919
'\u{0021}',
2020
'\u{0022}',
2121
'\u{0023}',

0 commit comments

Comments
 (0)