Skip to content

Commit 9a6d5c5

Browse files
committed
Fixup tests to run with only alloc feature
- Fixup unused import warning when only using alloc feature - Fixup import of format!/vec! macros when only using alloc
1 parent e5b5827 commit 9a6d5c5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ser.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ use alloc::{collections::BTreeMap, vec::Vec};
99
#[cfg(feature = "std")]
1010
use std::{collections::BTreeMap, io, vec::Vec};
1111

12-
use crate::write::{self, Write};
12+
#[cfg(feature = "std")]
13+
use crate::write;
14+
15+
use crate::write::Write;
1316

1417
/// Serializes an instance of `T` into the writer `W` as `Bencode` data.
1518
///
@@ -590,7 +593,7 @@ mod tests {
590593
use serde_bytes::ByteBuf;
591594

592595
#[cfg(all(feature = "alloc", not(feature = "std")))]
593-
use alloc::string::String;
596+
use alloc::{format, string::String, vec};
594597
#[cfg(feature = "std")]
595598
use std::string::String;
596599

0 commit comments

Comments
 (0)