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
27 changes: 26 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,41 @@ jobs:
run: |
cargo update -p serde_test --precise 1.0.163
cargo update -p serde --precise 1.0.69
- name: Tests
- name: Build
run: |
cargo build -v --no-default-features
cargo build --verbose --features "${{ matrix.features }}"
- name: Tests
run: |
cargo doc --verbose --features "${{ matrix.features }}" --no-deps
cargo test --verbose --features "${{ matrix.features }}"
cargo test --release --verbose --features "${{ matrix.features }}"
- name: Test run benchmarks
if: matrix.bench != ''
run: cargo test -v --benches

nostd:
runs-on: ubuntu-latest
continue-on-error: false
strategy:
matrix:
include:
- rust: stable
target: thumbv6m-none-eabi
features: zeroize

name: nostd/${{ matrix.target }}/${{ matrix.rust }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- name: Tests
run: |
cargo rustc "--target=${{ matrix.target }}" --no-default-features --features "${{ matrix.features }}"


miri:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions src/array_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::fmt;
use std::hash::{Hash, Hasher};
use std::mem::MaybeUninit;
use std::ops::{Deref, DerefMut};
#[cfg(feature="std")]
use std::path::Path;
use std::ptr;
use std::slice;
Expand Down Expand Up @@ -502,6 +503,7 @@ impl<const CAP: usize> fmt::Debug for ArrayString<CAP>
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { (**self).fmt(f) }
}

#[cfg(feature="std")]
impl<const CAP: usize> AsRef<Path> for ArrayString<CAP> {
fn as_ref(&self) -> &Path {
self.as_str().as_ref()
Expand Down