Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy fixes #868

Merged
merged 6 commits into from
May 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
command: fmt
args: --all -- --check

clippy_check:
# This job creates the "clippy-results" GitHub Action that lists the clippy results in a nice format.
clippy-json-output:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -41,8 +42,9 @@ jobs:
override: true
- uses: actions-rs/clippy-check@v1
with:
name: clippy-results
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets
args: --all-features --all-targets -- -Dwarnings -Drust-2018-idioms

docs:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion light-client-js/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use wasm_bindgen::JsValue;
// allocator.
#[cfg(feature = "wee_alloc")]
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
static ALLOC: wee_alloc::WeeAlloc<'_> = wee_alloc::WeeAlloc::INIT;

/// Check whether a given untrusted block can be trusted.
#[wasm_bindgen]
Expand Down
2 changes: 1 addition & 1 deletion proto/src/serializers/part_set_header_total.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ where
impl<'de> Visitor<'de> for PartSetHeaderTotalStringOrU32 {
type Value = u32;

fn expecting(&self, formatter: &mut Formatter) -> std::fmt::Result {
fn expecting(&self, formatter: &mut Formatter<'_>) -> std::fmt::Result {
formatter.write_str("an u32 integer or string between 0 and 2^32")
}

Expand Down