Skip to content

Commit 6dae31a

Browse files
committed
Ensure the tests compile with no-default-features
1 parent 5a359a1 commit 6dae31a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/tests/rust_fmt_argument_max_padding.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
1919
#![allow(clippy::unreadable_literal)]
2020

21-
use crate::format::TimeFormatter;
21+
#[cfg(feature = "alloc")]
22+
use {
23+
crate::format::TimeFormatter,
24+
alloc::{format, vec},
25+
};
26+
2227
use crate::Error;
2328

2429
use super::{check_all, get_format_err, get_format_err_bytes, MockTime};
@@ -129,9 +134,6 @@ fn test_rust_136932_reduce_fmt_argument_width_and_precision_fuzzer_failures_byte
129134
#[test]
130135
#[cfg(feature = "alloc")]
131136
fn test_format_specifiers_large_width_success() {
132-
use alloc::format;
133-
use alloc::vec;
134-
135137
// List of format specifiers that take a width.
136138
//
137139
// For each, we construct a format string with a width of 131,072. The
@@ -196,8 +198,6 @@ fn test_format_specifiers_large_width_success() {
196198
#[test]
197199
#[cfg(feature = "alloc")]
198200
fn test_format_specifiers_int_max_fail() {
199-
use alloc::format;
200-
201201
// List of format specifiers that take a width.
202202
//
203203
// Test that using a width equal to `INT_MAX` (2,147,483,647) causes an

0 commit comments

Comments
 (0)