Skip to content

Commit f2d135f

Browse files
authored
Auto merge of #51 - brightly-salty:format, r=KiChjang
Adds rustfmt to CI Adds rustfmt to CI, will run on push and pull_request and fails if the code is not properly formatted Fixes #47
2 parents 548cfaa + b0e4c75 commit f2d135f

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/rustfmt.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: rustfmt
2+
on: [push, pull_request]
3+
jobs:
4+
5+
rustfmt:
6+
name: Format
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout sources
10+
uses: actions/checkout@v2
11+
12+
- name: Install nightly toolchain with rustfmt available
13+
uses: actions-rs/toolchain@v1
14+
with:
15+
profile: minimal
16+
toolchain: stable
17+
override: true
18+
components: rustfmt
19+
20+
- name: Run cargo fmt
21+
uses: actions-rs/cargo@v1
22+
with:
23+
command: fmt
24+
args: --all -- --check

src/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ where
273273
{
274274
Utf8(Utf8LossyDecoder<Sink, A>),
275275
#[cfg(feature = "encoding")]
276-
Encoding(Box<encoding::RawDecoder>, Sink),
276+
Encoding(Box<dyn encoding::RawDecoder>, Sink),
277277
#[cfg(feature = "encoding_rs")]
278278
EncodingRs(encoding_rs::Decoder, Sink),
279279
}

0 commit comments

Comments
 (0)