lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README | LICENSE

commit c6beaf75f8d2f50ea92c5706ffeccf6ba38c524b
parent 00b59bdba1cb2b6a5e02494a0825d6f798a711d3
Author: triesap <tyson@radroots.org>
Date:   Mon, 22 Dec 2025 19:50:34 +0000

core: Align no_std alloc imports and bump toolchain


- Add alloc format and ToString in decimal helpers
- Gate alloc String import for no_std serde path
- Extend serde extension to import ToString
- Update toolchain channel to Rust 1.88.0

Diffstat:
Mcore/src/decimal.rs | 5+++++
Mcore/src/serde_ext.rs | 2+-
Mrust-toolchain.toml | 3+--
3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/core/src/decimal.rs b/core/src/decimal.rs @@ -4,6 +4,11 @@ use core::str::FromStr; use rust_decimal::Decimal; use rust_decimal::prelude::ToPrimitive; +#[cfg(not(feature = "std"))] +use alloc::{format, string::ToString}; +#[cfg(all(feature = "serde", not(feature = "std")))] +use alloc::string::String; + #[cfg(feature = "serde")] use serde::{Deserialize, Deserializer, Serialize, Serializer, de::Error as DeError}; diff --git a/core/src/serde_ext.rs b/core/src/serde_ext.rs @@ -3,7 +3,7 @@ #[cfg(feature = "std")] use std::string::String; #[cfg(not(feature = "std"))] -use alloc::string::String; +use alloc::string::{String, ToString}; use serde::{Deserialize, Deserializer, Serializer, de::Error as DeError}; diff --git a/rust-toolchain.toml b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.86.0" -\ No newline at end of file +channel = "1.88.0"