Skip to content

Commit 8c88a04

Browse files
Merge pull request #9 from LukasKalbertodt/add-basic-style-check-ci
Add basic style check to CI
2 parents 3cff8b4 + 4409759 commit 8c88a04

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ env:
1010
RUSTFLAGS: --deny warnings
1111

1212
jobs:
13+
style:
14+
name: Check basic style
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: LukasKalbertodt/[email protected]
19+
1320
check:
1421
name: 'Build & test'
1522
runs-on: ubuntu-20.04

src/tests.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ fn proc_macro() {
113113
($input:expr, expected: $expected:path, actual: $actual:path $(,)?) => {
114114
let err = $input.unwrap_err();
115115
if err.expected != $expected {
116-
panic!("err.expected was expected to be {:?}, but is {:?}", $expected, err.expected);
116+
panic!(
117+
"err.expected was expected to be {:?}, but is {:?}",
118+
$expected,
119+
err.expected,
120+
);
117121
}
118122
if err.actual != $actual {
119123
panic!("err.actual was expected to be {:?}, but is {:?}", $actual, err.actual);
@@ -177,7 +181,10 @@ fn proc_macro() {
177181
assert_eq!(Literal::from(FloatLit::try_from(pm_f32_lit.clone()).unwrap()), f32_lit);
178182
assert_eq!(Literal::from(FloatLit::try_from(pm_f64_lit.clone()).unwrap()), f64_lit);
179183
assert_eq!(Literal::from(StringLit::try_from(pm_string_lit.clone()).unwrap()), string_lit);
180-
assert_eq!(Literal::from(ByteStringLit::try_from(pm_bytestr_lit.clone()).unwrap()), bytestr_lit);
184+
assert_eq!(
185+
Literal::from(ByteStringLit::try_from(pm_bytestr_lit.clone()).unwrap()),
186+
bytestr_lit,
187+
);
181188
assert_eq!(Literal::from(CharLit::try_from(pm_char_lit.clone()).unwrap()), char_lit);
182189

183190
assert_invalid_token!(

0 commit comments

Comments
 (0)