Skip to content

Commit

Permalink
chore: rename feature json -> serde_json_value
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Oct 28, 2024
1 parent 7dfc00a commit 5cfceeb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion borsh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ std = []
rc = []
de_strict_order = []
# Implements BorshSerialize and BorshDeserialize for serde_json::Value.
json = ["serde_json"]
serde_json_value = ["dep:serde_json"]
6 changes: 3 additions & 3 deletions borsh/src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ impl BorshDeserialize for bson::oid::ObjectId {
}
}

#[cfg(feature = "json")]
#[cfg(feature = "serde_json_value")]
impl BorshDeserialize for serde_json::Value {
#[inline]
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self> {
Expand Down Expand Up @@ -492,7 +492,7 @@ impl BorshDeserialize for serde_json::Value {
}
}

#[cfg(feature = "json")]
#[cfg(feature = "serde_json_value")]
impl BorshDeserialize for serde_json::Number {
#[inline]
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self> {
Expand Down Expand Up @@ -528,7 +528,7 @@ impl BorshDeserialize for serde_json::Number {
}
}

#[cfg(feature = "json")]
#[cfg(feature = "serde_json_value")]
impl BorshDeserialize for serde_json::Map<String, serde_json::Value> {
#[inline]
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self> {
Expand Down
6 changes: 3 additions & 3 deletions borsh/src/ser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ impl BorshSerialize for bson::oid::ObjectId {
}
}

#[cfg(feature = "json")]
#[cfg(feature = "serde_json_value")]
impl BorshSerialize for serde_json::Value {
#[inline]
fn serialize<W: Write>(&self, writer: &mut W) -> Result<()> {
Expand Down Expand Up @@ -347,7 +347,7 @@ impl BorshSerialize for serde_json::Value {
}
}

#[cfg(feature = "json")]
#[cfg(feature = "serde_json_value")]
impl BorshSerialize for serde_json::Number {
#[inline]
fn serialize<W: Write>(&self, writer: &mut W) -> Result<()> {
Expand Down Expand Up @@ -377,7 +377,7 @@ impl BorshSerialize for serde_json::Number {
}
}

#[cfg(feature = "json")]
#[cfg(feature = "serde_json_value")]
impl BorshSerialize for serde_json::Map<String, serde_json::Value> {
#[inline]
fn serialize<W: Write>(&self, writer: &mut W) -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion borsh/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ mod roundtrip {
mod test_cells;
#[cfg(feature = "rc")]
mod test_rc;
#[cfg(feature = "json")]
#[cfg(feature = "serde_json_value")]
mod test_json;

#[cfg(feature = "derive")]
Expand Down

0 comments on commit 5cfceeb

Please sign in to comment.