Skip to content

Commit

Permalink
Bump serde from 1.0.180 to 1.0.183 in /lang/rust (#2424)
Browse files Browse the repository at this point in the history
* Bump serde from 1.0.180 to 1.0.183 in /lang/rust

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.180 to 1.0.183.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.180...v1.0.183)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update the Serde impl after serde-rs/serde#2505

Also see serde-rs/serde#2496

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
dependabot[bot] and martin-g authored Aug 15, 2023
1 parent 3ca8f5f commit 39870c2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion avro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ libflate = { default-features = false, version = "2.0.0", features = ["std"] }
log = { default-features = false, version = "0.4.20" }
num-bigint = { default-features = false, version = "0.4.3" }
regex = { default-features = false, version = "1.9.3", features = ["std", "perf"] }
serde = { default-features = false, version = "1.0.180", features = ["derive"] }
serde = { default-features = false, version = "1.0.183", features = ["derive"] }
serde_json = { default-features = false, version = "1.0.104", features = ["std"] }
snap = { default-features = false, version = "1.1.0", optional = true }
strum = { default-features = false, version = "0.25.0" }
Expand Down
1 change: 1 addition & 0 deletions avro/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ impl<'a, 'de> de::Deserializer<'de> for &'a Deserializer<'de> {
match *self.input {
// This branch can be anything...
Value::Record(ref fields) => visitor.visit_enum(EnumDeserializer::new(fields)),
Value::String(ref field) => visitor.visit_enum(EnumUnitDeserializer::new(field)),
// This has to be a unit Enum
Value::Enum(_index, ref field) => visitor.visit_enum(EnumUnitDeserializer::new(field)),
_ => Err(de::Error::custom(format!(
Expand Down
6 changes: 3 additions & 3 deletions avro/src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ impl<'b> ser::Serializer for &'b mut Serializer {
fn serialize_unit_variant(
self,
_: &'static str,
index: u32,
_variant_index: u32,
variant: &'static str,
) -> Result<Self::Ok, Self::Error> {
Ok(Value::Enum(index, variant.to_string()))
Ok(Value::String(variant.to_string()))
}

fn serialize_newtype_struct<T: ?Sized>(
Expand Down Expand Up @@ -720,7 +720,7 @@ mod tests {
a: UnitExternalEnum::Val1,
};

let expected = Value::Record(vec![("a".to_owned(), Value::Enum(0, "Val1".to_owned()))]);
let expected = Value::Record(vec![("a".to_owned(), Value::String("Val1".to_owned()))]);

assert_eq!(
to_value(test)?,
Expand Down
2 changes: 1 addition & 1 deletion avro_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ syn = { default-features = false, version = "2.0.28", features = ["full", "fold"
[dev-dependencies]
apache-avro = { default-features = false, path = "../avro", features = ["derive"] }
proptest = { default-features = false, version = "1.2.0", features = ["std"] }
serde = { default-features = false, version = "1.0.180", features = ["derive"] }
serde = { default-features = false, version = "1.0.183", features = ["derive"] }
2 changes: 1 addition & 1 deletion wasm-demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
apache-avro = { path = "../avro" }
serde = { default-features = false, version = "1.0.180", features = ["derive"] }
serde = { default-features = false, version = "1.0.183", features = ["derive"] }
wasm-bindgen = "0.2.87"

[dev-dependencies]
Expand Down

0 comments on commit 39870c2

Please sign in to comment.