commit 70542e6998939b09c7568f9d23dd0ff7746f74ba
parent ba3ef17b01cb86f98b5683fb19f52077845cf708
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:
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"