Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bstr feature in no_std #43

Merged
merged 1 commit into from
Jan 27, 2025
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
21 changes: 11 additions & 10 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ jobs:
toolchain:
- stable
- nightly
profile:
- dev
- release
os:
- ubuntu-latest
- windows-latest
- macos-latest
features:
- ""
- "--no-default-features"
- "--all-features"

runs-on: ${{matrix.os}}

Expand All @@ -37,19 +30,27 @@ jobs:
with:
toolchain: ${{matrix.toolchain}}

- uses: taiki-e/install-action@cargo-hack

- name: Show version
run: cargo version

- name: Check
run: cargo hack check -v --feature-powerset --no-dev-deps

- name: Build
run: cargo build --verbose --profile ${{matrix.profile}} ${{matrix.features}}
run: cargo hack build -v --each-feature

- name: Run tests
run: cargo test --verbose --profile ${{matrix.profile}} ${{matrix.features}} -- --nocapture
run: cargo hack test -v --each-feature -- --nocapture

- name: Run tests (release)
run: cargo hack test -v --each-feature --release -- --nocapture

- name: Run loom tests
env:
RUSTFLAGS: "--cfg loom"
run: cargo test --verbose --profile ${{matrix.profile}} ${{matrix.features}} loom -- --nocapture
run: cargo hack test -v --each-feature --release loom -- --nocapture

fmt:
runs-on: ubuntu-latest
Expand Down
82 changes: 43 additions & 39 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
{
"cSpell.words": [
"alloc",
"arcstr",
"bstr",
"bstring",
"clippy",
"clonable",
"codecov",
"decr",
"endianness",
"FFFD",
"flexstr",
"gnuabi",
"hipbyt",
"hipstr",
"imstr",
"interoperabilty",
"miri",
"MIRIFLAGS",
"multibyte",
"nonoverlapping",
"powi",
"repr",
"rmatch",
"rmatches",
"rsplit",
"rsplitn",
"rustc",
"serde",
"splitn",
"stddev",
"subslice",
"uninit",
"uppercased",
"Zmiri"
],
"rust-analyzer.check.features": "all",
"rust-analyzer.cargo.features": "all"
}
"cSpell.words": [
"alloc",
"arcstr",
"bstr",
"bstring",
"clippy",
"clonable",
"codecov",
"decr",
"endianness",
"FFFD",
"flexstr",
"gnuabi",
"hipbyt",
"hipstr",
"imstr",
"interoperabilty",
"miri",
"MIRIFLAGS",
"multibyte",
"nocapture",
"nonoverlapping",
"powerset",
"powi",
"repr",
"rmatch",
"rmatches",
"rsplit",
"rsplitn",
"rustc",
"RUSTFLAGS",
"serde",
"splitn",
"stddev",
"subslice",
"taiki-e",
"uninit",
"uppercased",
"Zmiri"
],
"rust-analyzer.check.features": "all",
"rust-analyzer.cargo.features": "all"
}
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

Notable changes only.

## Unreleased

### Changed

- improve feature testing in CI

### Fixed

- fix `bstr` feature in `no_std`

## [0.7.0] - 2025-01-10

### Added
Expand All @@ -25,7 +35,7 @@ Notable changes only.
- remove `serde_bytes` dependency
- remove `sptr` dependency (following provenance API stabilization in Rust 1.84)

## Fixed
### Fixed

- compilation with `serde` for non-Windows non-Unix targets, in particular wasm

Expand Down
2 changes: 1 addition & 1 deletion src/string/bstr.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Bstr support for strings.

use alloc::str;
use alloc::string::String;
use alloc::vec::Vec;
use core::borrow::Borrow;
use std::string::String;

use bstr::{BStr, BString};

Expand Down
Loading