From dc0e7b39966cf763296e6db4693f66a50ce59fa7 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Thu, 9 Jul 2020 10:15:07 +0200 Subject: [PATCH] CI: run cargo fmt after build --- .github/workflows/rust.yml | 16 +++++++++++----- advanced/firmware/src/bin/usb-2-solution.rs | 1 - 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 17e339c..aeaaf0d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -51,12 +51,18 @@ jobs: - name: build tools working-directory: ./tools - run: cargo build --verbose + run: | + cargo build --verbose + cargo fmt --all -- --check - - name: build beginner/apps + - name: build and fmt beginner/apps working-directory: ./beginner/apps - run: cargo build --verbose + run: | + cargo build --verbose + cargo fmt --all -- --check - - name: build advanced/firmware + - name: build and fmt advanced/firmware working-directory: ./advanced/firmware - run: cargo build --verbose + run: | + cargo build --verbose + cargo fmt --all -- --check \ No newline at end of file diff --git a/advanced/firmware/src/bin/usb-2-solution.rs b/advanced/firmware/src/bin/usb-2-solution.rs index 3f8cfe4..342472a 100644 --- a/advanced/firmware/src/bin/usb-2-solution.rs +++ b/advanced/firmware/src/bin/usb-2-solution.rs @@ -44,7 +44,6 @@ fn on_event(usbd: &USBD, event: Event) { Event::UsbEp0DataDone => todo!(), Event::UsbEp0Setup => { - // the BMREQUESTTYPE register contains information about data recipient, transfer type and direction let bmrequesttype = usbd.bmrequesttype.read().bits() as u8; // the BREQUEST register stores the type of the current request (e.g. SET_ADDRESS, GET_DESCRIPTOR, ...)