Skip to content

Commit 47d1915

Browse files
author
Martijn Groeneveldt
committed
Fix a EOL and cargo fmt
1 parent e985dba commit 47d1915

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
target
22
/Cargo.lock
33
/.cargo/config
4-
.idea
4+
.idea

build/match_byte.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ fn get_byte_from_expr_lit(expr: &Box<syn::Expr>) -> u8 {
7373
}
7474

7575
/// Parse a pattern and fill the table accordingly
76-
fn parse_pat_to_table<'a>(pat: &'a syn::Pat, case_id: u8, wildcard: &mut Option<&'a syn::Ident>, table: &mut [u8; 256]) {
76+
fn parse_pat_to_table<'a>(
77+
pat: &'a syn::Pat,
78+
case_id: u8,
79+
wildcard: &mut Option<&'a syn::Ident>,
80+
table: &mut [u8; 256],
81+
) {
7782
match pat {
7883
&syn::Pat::Lit(syn::PatLit { ref expr, .. }) => {
7984
let value = get_byte_from_expr_lit(expr);
@@ -108,7 +113,7 @@ fn parse_pat_to_table<'a>(pat: &'a syn::Pat, case_id: u8, wildcard: &mut Option<
108113
*byte = case_id;
109114
}
110115
}
111-
},
116+
}
112117
&syn::Pat::Or(syn::PatOr { ref cases, .. }) => {
113118
for case in cases {
114119
parse_pat_to_table(case, case_id, wildcard, table);

0 commit comments

Comments
 (0)