From d3673886b34ed8fb9dc2eecf778bd056fc483ac0 Mon Sep 17 00:00:00 2001 From: Michael Beaumont Date: Thu, 18 Mar 2021 20:02:42 +0100 Subject: [PATCH 1/2] Run cargo fmt --- embassy/src/io/traits.rs | 1 - embassy/src/io/util/read.rs | 2 +- embassy/src/io/util/read_buf.rs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/embassy/src/io/traits.rs b/embassy/src/io/traits.rs index f1f91a46..6138adb4 100644 --- a/embassy/src/io/traits.rs +++ b/embassy/src/io/traits.rs @@ -1,4 +1,3 @@ - use core::ops::DerefMut; use core::pin::Pin; use core::task::{Context, Poll}; diff --git a/embassy/src/io/util/read.rs b/embassy/src/io/util/read.rs index 31aaa0da..274b43a4 100644 --- a/embassy/src/io/util/read.rs +++ b/embassy/src/io/util/read.rs @@ -1,4 +1,4 @@ -use super::super::error::{Result}; +use super::super::error::Result; use super::super::traits::AsyncBufRead; use core::cmp::min; diff --git a/embassy/src/io/util/read_buf.rs b/embassy/src/io/util/read_buf.rs index 7489eac2..71299b05 100644 --- a/embassy/src/io/util/read_buf.rs +++ b/embassy/src/io/util/read_buf.rs @@ -1,4 +1,4 @@ -use super::super::error::{Result}; +use super::super::error::Result; use super::super::traits::AsyncBufRead; use core::pin::Pin; From 5ad259620c9abb958ff80c42cb1117be47f8bad1 Mon Sep 17 00:00:00 2001 From: Michael Beaumont Date: Thu, 18 Mar 2021 20:59:31 +0100 Subject: [PATCH 2/2] Add cargo fmt --all -- --check to ci.sh --- .github/workflows/rust.yml | 2 +- ci.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cdfe354c..17b8353e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,7 +18,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: nightly - components: rust-src + components: rust-src, rustfmt override: true - name: install run: rustup target add thumbv7em-none-eabi thumbv6m-none-eabi diff --git a/ci.sh b/ci.sh index d726db37..d169246b 100755 --- a/ci.sh +++ b/ci.sh @@ -4,6 +4,8 @@ set -euxo pipefail cd $(dirname $0) +cargo fmt --all -- --check + # embassy std (cd embassy-std-examples; cargo build)