Skip to content
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
45 changes: 45 additions & 0 deletions .github/workflows/nightly-daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Run CI with Rust nightly builds to notice breakage early.

name: nightly-daily
on:
schedule:
- cron: "8 20 * * *"
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
ci:
strategy:
matrix:
- rust_version: nightly

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Cache Rust files
uses: actions/cache@v4
with:
# target/ci isn't cached since it will be expected to change every day
path: |
~/.cargo/
# Save a unique cache each time
# (https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache)
key: rust-${{ matrix.rust_version }}-${{ github.run_id }}
# Load from the most recent match
restore-keys: |
rust-${{ matrix.rust_version }}

- name: Rustup ${{ matrix.rust_version }}
run: |
rustup update ${{ matrix.rust_version }}
rustup override set ${{ matrix.rust_version }}

- name: Build and test ${{ matrix.rust_version }}
env:
# Older clippy has some unwanted lints, ignore them.
NO_CLIPPY: ${{ matrix.no_clippy }}
run: ./ci/runtests.sh
4 changes: 4 additions & 0 deletions pldm-fw/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#![forbid(unsafe_code)]
// #![warn(missing_docs)]

// collapsible_match lint suggests moving `if` statements into the parent
// `match` arms, but that makes code intent less clear.
#![allow(clippy::collapsible_match)]

use core::fmt;
use log::debug;

Expand Down
2 changes: 1 addition & 1 deletion pldm-platform/src/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ impl<T: FromPrimitive + Debug> StateDebug<T> {
impl<T: FromPrimitive + Debug> Debug for StateDebug<T> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
if let Some(v) = T::from_u8(self.state) {
write!(f, "{} {:?}", self.state, &v)
write!(f, "{} {:?}", self.state, v)
} else {
write!(f, "{} (unrecognised state)", self.state)
}
Expand Down
2 changes: 1 addition & 1 deletion pldm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl core::fmt::Display for PldmError {
Self::InvalidArgument => write!(f, "Invalid Argument"),
Self::NoSpace => write!(f, "Insufficient buffer space available"),
Self::CompletionCode(c) => {
write!(f, "Error completion code {c:#02x} received")
write!(f, "Error completion code 0x{c:02x} received")
}
}
}
Expand Down
Loading