Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude = ["/.github", "/*.py", "/*.sh", "/src-backup"]
[dependencies]
tinyvec_macros = { version = "0.1", optional = true }
# Provides `Serialize` and `Deserialize` implementations
serde = { version = "1.0", optional = true, default-features = false }
serde_core = { version = "1.0", optional = true, default-features = false }
# Provides derived `Arbitrary` implementations
arbitrary = { version = "1", optional = true }
# Provides `BorshSerialize` and `BorshDeserialize implementations
Expand All @@ -31,6 +31,9 @@ alloc = ["tinyvec_macros"]
# Provide things that require Rust's `std` module
std = ["alloc"]

# Provides `Serialize` and `Deserialize` implementations
serde = ["dep:serde_core"]

# (not part of Vec!) Extra methods to let you grab the slice of memory after the
# "active" portion of an `ArrayVec` or `SliceVec`.
grab_spare_slice = []
Expand Down
4 changes: 2 additions & 2 deletions src/arrayvec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ use core::convert::{TryFrom, TryInto};
#[cfg(feature = "serde")]
use core::marker::PhantomData;
#[cfg(feature = "serde")]
use serde::de::{
use serde_core::de::{
Deserialize, Deserializer, Error as DeserializeError, SeqAccess, Visitor,
};
#[cfg(feature = "serde")]
use serde::ser::{Serialize, SerializeSeq, Serializer};
use serde_core::ser::{Serialize, SerializeSeq, Serializer};

/// Helper to make an `ArrayVec`.
///
Expand Down
4 changes: 2 additions & 2 deletions src/tinyvec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use alloc::collections::TryReserveError;
#[cfg(feature = "serde")]
use core::marker::PhantomData;
#[cfg(feature = "serde")]
use serde::de::{Deserialize, Deserializer, SeqAccess, Visitor};
use serde_core::de::{Deserialize, Deserializer, SeqAccess, Visitor};
#[cfg(feature = "serde")]
use serde::ser::{Serialize, SerializeSeq, Serializer};
use serde_core::ser::{Serialize, SerializeSeq, Serializer};

/// Helper to make a `TinyVec`.
///
Expand Down