Skip to content

Commit

Permalink
Also use alloc feature in formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
athre0z committed Mar 9, 2024
1 parent 8eee457 commit 75c4d44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ default = ["std", "full-decoder", "formatter"]
alloc = []
std = ["alloc"]
full-decoder = []
formatter = ["std", "full-decoder"]
formatter = ["alloc", "full-decoder"]
encoder = ["alloc", "full-decoder"]
serialization = ["serde", "bitflags/serde"]
nolibc = []
Expand Down
1 change: 1 addition & 0 deletions src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ macro_rules! insn32 {
#[cfg(all(test, feature = "formatter"))]
mod tests {
use super::*;
use alloc::string::ToString as _;

#[test]
fn insn_macro() {
Expand Down
3 changes: 2 additions & 1 deletion src/formatter.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//! Textual instruction formatting routines.

use alloc::{borrow::ToOwned, boxed::Box, string::String};
use core::{
ffi::{c_void, CStr},
fmt,
mem::{self, MaybeUninit},
ffi::{c_void, CStr},
ptr,
};

Expand Down

0 comments on commit 75c4d44

Please sign in to comment.