Add cfg attribute to Cow imports

This commit is contained in:
Fabian Löschner 2021-12-09 18:29:45 +01:00 committed by Fabian Loeschner
parent a8fa7f71c0
commit 9b87fa4ffa
4 changed files with 8 additions and 4 deletions

View File

@ -1,10 +1,11 @@
//! An implementation of the COO sparse matrix format.
use crate::SparseFormatError;
use std::borrow::Cow;
#[cfg(feature = "serde-serialize")]
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
#[cfg(feature = "serde-serialize")]
use std::borrow::Cow;
/// A COO representation of a sparse matrix.
///

View File

@ -7,12 +7,13 @@ use crate::cs::{CsLane, CsLaneIter, CsLaneIterMut, CsLaneMut, CsMatrix};
use crate::csr::CsrMatrix;
use crate::pattern::{SparsityPattern, SparsityPatternFormatError, SparsityPatternIter};
use crate::{SparseEntry, SparseEntryMut, SparseFormatError, SparseFormatErrorKind};
use std::borrow::Cow;
use nalgebra::Scalar;
use num_traits::One;
#[cfg(feature = "serde-serialize")]
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
#[cfg(feature = "serde-serialize")]
use std::borrow::Cow;
use std::slice::{Iter, IterMut};
/// A CSC representation of a sparse matrix.

View File

@ -6,12 +6,13 @@ use crate::cs::{CsLane, CsLaneIter, CsLaneIterMut, CsLaneMut, CsMatrix};
use crate::csc::CscMatrix;
use crate::pattern::{SparsityPattern, SparsityPatternFormatError, SparsityPatternIter};
use crate::{SparseEntry, SparseEntryMut, SparseFormatError, SparseFormatErrorKind};
use std::borrow::Cow;
use nalgebra::Scalar;
use num_traits::One;
#[cfg(feature = "serde-serialize")]
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
#[cfg(feature = "serde-serialize")]
use std::borrow::Cow;
use std::iter::FromIterator;
use std::slice::{Iter, IterMut};

View File

@ -1,12 +1,13 @@
//! Sparsity patterns for CSR and CSC matrices.
use crate::cs::transpose_cs;
use crate::SparseFormatError;
use std::borrow::Cow;
use std::error::Error;
use std::fmt;
#[cfg(feature = "serde-serialize")]
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
#[cfg(feature = "serde-serialize")]
use std::borrow::Cow;
/// A representation of the sparsity pattern of a CSR or CSC matrix.
///