Skip to content

Commit c630628

Browse files
Use rustfmt
1 parent f142cb7 commit c630628

File tree

14 files changed

+443
-468
lines changed

14 files changed

+443
-468
lines changed

.github/workflows/rust.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@ name: Rust
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
steps:
18-
- uses: actions/checkout@v3
19-
- name: Build
20-
run: cargo build --verbose
21-
- name: Run tests
22-
run: cargo test --verbose
17+
- uses: actions/checkout@v3
18+
- name: Build
19+
run: cargo build --verbose
20+
- name: Run tests
21+
run: cargo test --verbose

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/mirrors-prettier
3-
rev: "v2.4.1"
3+
rev: "v2.6.2"
44
hooks:
55
- id: prettier
66
- repo: https://github.com/doublify/pre-commit-rust

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ You can find the tests in `schema_validation.rs` for both `v.1.6` and `v2.0.1`
1515
`src/` : library files for v1.6 and v2.0.1
1616

1717
`docs/` : official ocpp specification
18+
19+
# contribute
20+
21+
Use `rustfmt` before you PR.
22+
23+
## pre-commit
24+
25+
pre-commit config is available. You can read more about it at [pre-commits](https://pre-commit.com) website.

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
//!
1313
//! # v2_0_1
1414
//! The [v2_0_1](v2_0_1) module contains the `ocpp 2.0.1` implementation
15-
pub mod v1_6;
16-
pub mod v2_0_1;
1715
/// tests
1816
#[cfg(test)]
1917
pub mod tests;
18+
pub mod v1_6;
19+
pub mod v2_0_1;

src/tests/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/// Validate implementation using official json schemas
22
/// provided by the Open Charge Alliance
33
#[cfg(test)]
4-
mod schema_validation;
4+
mod schema_validation;

src/tests/schema_validation/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#[cfg(test)]
2-
mod v2_0_1;
3-
#[cfg(test)]
42
mod v1_6;
3+
#[cfg(test)]
4+
mod v2_0_1;

0 commit comments

Comments
 (0)