Skip to content

Commit 841449f

Browse files
committed
fix: enable serde alloc feature for no_std builds
#[serde(flatten)] on CommonFields requires serde's alloc feature, which was never activated for the no_std (embassy-rt) build path. The std feature enables serde/std (which implies alloc), masking the issue for default builds. Also add Box imports needed for the boxed error variants in no_std context.
1 parent 6b2ffc4 commit 841449f

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ chrono = { version = "0.4.19", default-features = false, features = [
5656
] }
5757
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
5858
rand = { version = "0.8.5", default-features = false, features = ["getrandom"] }
59-
serde = { version = "1.0.130", default-features = false, features = ["derive"] }
59+
serde = { version = "1.0.130", default-features = false, features = ["derive", "alloc"] }
6060
serde_json = { version = "1.0.68", default-features = false, features = [
6161
"alloc",
6262
] }

src/asynch/clients/exceptions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use alloc::boxed::Box;
12
use thiserror_no_std::Error;
23

34
#[cfg(feature = "helpers")]

src/models/results/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pub mod unsubscribe;
4343
use super::{requests::XRPLRequest, Amount, XRPLModelException, XRPLModelResult};
4444
use alloc::{
4545
borrow::Cow,
46+
boxed::Box,
4647
string::{String, ToString},
4748
};
4849
use core::convert::{TryFrom, TryInto};

0 commit comments

Comments
 (0)