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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.24.6] - 2025-10-22

### Fixed
- Restored `no_std` builds by importing `alloc::String` for response helpers and
the legacy constructor, keeping textual detail setters available without the
`std` feature.
- Ensured `AppCode::from_str` remains available in `no_std` mode by explicitly
bringing `ToOwned` into scope and gated the `std::io::Error` conversion example
so doctests compile without the standard library.

## [0.24.5] - 2025-10-21

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "masterror"
version = "0.24.5"
version = "0.24.6"
rust-version = "1.90"
edition = "2024"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ The build script keeps the full feature snippet below in sync with

~~~toml
[dependencies]
masterror = { version = "0.24.5", default-features = false }
masterror = { version = "0.24.6", default-features = false }
# or with features:
# masterror = { version = "0.24.5", features = [
# masterror = { version = "0.24.6", features = [
# "std", "axum", "actix", "openapi",
# "serde_json", "tracing", "metrics", "backtrace",
# "sqlx", "sqlx-migrate", "reqwest", "redis",
Expand Down
2 changes: 1 addition & 1 deletion src/code/app_code.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use alloc::{boxed::Box, string::String};
use alloc::{borrow::ToOwned, boxed::Box, string::String};
use core::{
error::Error as CoreError,
fmt::{self, Display},
Expand Down
3 changes: 3 additions & 0 deletions src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
//! `std::io::Error` mapping:
//!
//! ```rust
//! # #[cfg(feature = "std")]
//! # {
//! use std::io::{self, ErrorKind};
//!
//! use masterror::{AppError, AppErrorKind, AppResult};
Expand All @@ -55,6 +57,7 @@
//!
//! let err = open().unwrap_err();
//! assert!(matches!(err.kind, AppErrorKind::Internal));
//! # }
//! ```
//!
//! `String` mapping (useful for ad-hoc validation without the `validator`
Expand Down
3 changes: 3 additions & 0 deletions src/response/details.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#[cfg(not(feature = "serde_json"))]
use alloc::string::String;

#[cfg(feature = "serde_json")]
use serde::Serialize;
#[cfg(feature = "serde_json")]
Expand Down
2 changes: 2 additions & 0 deletions src/response/legacy.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use alloc::string::String;

use http::StatusCode;

use super::core::ErrorResponse;
Expand Down
Loading