Skip to content

Commit 45966a0

Browse files
committed
FIX: Fix unused imports for std/no_std
1 parent 225d967 commit 45966a0

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

src/arrayformat.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ use super::{ArrayBase, ArrayView, Axis, Data, Dimension, NdProducer};
99
use crate::aliases::{Ix1, IxDyn};
1010
use std::fmt;
1111
use alloc::format;
12-
use alloc::string::String;
13-
use alloc::vec::Vec;
1412

1513
/// Default threshold, below this element count, we don't ellipsize
1614
const ARRAY_MANY_ELEMENT_LIMIT: usize = 500;
@@ -290,6 +288,8 @@ where
290288
mod formatting_with_omit {
291289
use itertools::Itertools;
292290
use std::fmt;
291+
use alloc::string::String;
292+
use alloc::vec::Vec;
293293

294294
use super::*;
295295
use crate::prelude::*;

src/impl_constructors.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ use crate::extension::nonnull::nonnull_from_vec_data;
2424
use crate::imp_prelude::*;
2525
use crate::indexes;
2626
use crate::indices;
27-
use crate::iterators::{to_vec, to_vec_mapped};
27+
#[cfg(feature = "std")]
28+
use crate::iterators::to_vec;
29+
use crate::iterators::to_vec_mapped;
2830
use crate::StrideShape;
2931
#[cfg(feature = "std")]
3032
use crate::{geomspace, linspace, logspace};

src/linalg_traits.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@
55
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
66
// option. This file may not be copied, modified, or distributed
77
// except according to those terms.
8-
use crate::ScalarOperand;
8+
99
#[cfg(feature = "std")]
1010
use num_traits::Float;
1111
use num_traits::{One, Zero};
12+
13+
#[cfg(feature = "std")]
1214
use std::fmt;
1315
use std::ops::{Add, Div, Mul, Sub};
16+
#[cfg(feature = "std")]
1417
use std::ops::{AddAssign, DivAssign, MulAssign, RemAssign, SubAssign};
1518

19+
#[cfg(feature = "std")]
20+
use crate::ScalarOperand;
21+
1622
/// Elements that support linear algebra operations.
1723
///
1824
/// `'static` for type-based specialization, `Copy` so that they don't need move

src/stacking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
66
// option. This file may not be copied, modified, or distributed
77
// except according to those terms.
8-
use alloc::vec::Vec;
8+
99
use crate::error::{from_kind, ErrorKind, ShapeError};
1010
use crate::imp_prelude::*;
1111
use crate::traversal_utils::assign_to;

0 commit comments

Comments
 (0)