From 9ab5c542011b4e87fb83e6cf63c42c9276f081b6 Mon Sep 17 00:00:00 2001 From: akagiyuu Date: Thu, 14 May 2026 11:16:09 +0700 Subject: [PATCH 1/3] fix: enable byte-unit serde feature --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index cb28f7f..889bec3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,4 +24,4 @@ rand = "0.10.1" rstest = "0.26.1" [features] -serde = ["dep:serde"] +serde = ["dep:serde", "byte-unit/serde"] From 49f18ec1cdebe08f2ae582fd4c66fcdcb9f1bcf0 Mon Sep 17 00:00:00 2001 From: akagiyuu Date: Thu, 14 May 2026 11:16:17 +0700 Subject: [PATCH 2/3] fix: add clone and copy --- src/metrics.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/metrics.rs b/src/metrics.rs index 2d7b927..ce4b7a0 100644 --- a/src/metrics.rs +++ b/src/metrics.rs @@ -2,7 +2,7 @@ use std::time::Duration; use byte_unit::Byte; -#[derive(Debug, PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq, Clone, Copy)] #[cfg_attr(feature = "serde", derive(serde::Serialize))] pub enum Verdict { Accepted, @@ -14,7 +14,7 @@ pub enum Verdict { IdleTimeLimitExceeded, } -#[derive(Debug)] +#[derive(Debug, Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize))] pub struct Metrics { pub verdict: Verdict, From d637bdd7a4341bc8ed28a85e6f3e96d19ae8d661 Mon Sep 17 00:00:00 2001 From: akagiyuu Date: Thu, 14 May 2026 11:18:22 +0700 Subject: [PATCH 3/3] fix(ci): add all features --- .github/workflows/check.yaml | 2 +- .github/workflows/test.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 3bc81be..14d7716 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -19,6 +19,6 @@ jobs: components: clippy, rustfmt - uses: Swatinem/rust-cache@v2 - name: Check clippy - run: cargo clippy --workspace -- -D warnings + run: cargo clippy --all-features --workspace -- -D warnings - name: Check rustfmt run: cargo fmt --all -- --check diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fc083a8..db63db5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -47,4 +47,4 @@ jobs: - name: Run test run: | - cargo llvm-cov nextest --no-tests pass --target ${{ matrix.target }} + cargo llvm-cov nextest --all-features --no-tests pass --target ${{ matrix.target }}