diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 000000000000..2d9d2e3c17ec
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,19 @@
+name: Publish docs
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ publish-docs:
+ name: publish docs
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ - run: |
+ cargo install mdbook
+ mdbook build ./documentation
+ bash ./scripts/build-rust-docs.sh
\ No newline at end of file
diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml
new file mode 100644
index 000000000000..664d46e98c59
--- /dev/null
+++ b/.github/workflows/msrv.yml
@@ -0,0 +1,148 @@
+on: [pull_request]
+
+name: msrv
+
+jobs:
+ check:
+ name: check
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ rust:
+ - stable
+ - 1.57.0
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.rust }}
+ override: true
+
+ - name: Run cargo check
+ uses: actions-rs/cargo@v1
+ with:
+ command: check
+
+ test:
+ name: unit tests
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ rust:
+ - stable
+ - 1.57.0
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.rust }}
+ override: true
+
+ - name: Run cargo test
+ run: make test
+
+ fmt:
+ name: fmt
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ rust:
+ - stable
+ - 1.57.0
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.rust }}
+ override: true
+
+ - name: check license
+ run: make license
+
+ - name: Install rustfmt
+ run: rustup component add rustfmt
+
+ - name: Run cargo fmt
+ uses: actions-rs/cargo@v1
+ with:
+ command: fmt
+ args: --all -- --check
+
+ clippy:
+ name: clippy
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ rust:
+ - stable
+ - 1.57.0
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.rust }}
+ override: true
+
+ - name: Install clippy
+ run: rustup component add clippy
+
+ - name: Run cargo clippy
+ uses: actions-rs/cargo@v1
+ with:
+ command: clippy
+ args: -- -D warnings
+
+
+ test-vectors:
+ name: test-vectors
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ rust:
+ - stable
+ - 1.57.0
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.rust }}
+ override: true
+ - name: build
+ run: |
+ git submodule update --init
+ make run-vectors
+
+ audit:
+ name: cargo audit
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ rust:
+ - stable
+ - 1.57.0
+ steps:
+ - name: Checkout sources
+ uses: actions/checkout@v2
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.rust }}
+ override: true
+ - name: build
+ run: |
+ cargo install cargo-audit
+ cargo audit --ignore RUSTSEC-2020-0159 --ignore RUSTSEC-2020-0071
\ No newline at end of file
diff --git a/blockchain/blocks/src/election_proof.rs b/blockchain/blocks/src/election_proof.rs
index 31bae10d640f..b13843e37df6 100644
--- a/blockchain/blocks/src/election_proof.rs
+++ b/blockchain/blocks/src/election_proof.rs
@@ -228,9 +228,7 @@ pub mod json {
where
S: Serializer,
{
- v.as_ref()
- .map(|s| ElectionProofJsonRef(s))
- .serialize(serializer)
+ v.as_ref().map(ElectionProofJsonRef).serialize(serializer)
}
pub fn deserialize<'de, D>(deserializer: D) -> Result