From 5d171da883f883df621b3c10ad0067acb0bfdf32 Mon Sep 17 00:00:00 2001 From: Omar Zabala-Ferrera <73452461+ozabalaferrera@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:42:45 -0500 Subject: [PATCH] Update rdkafka and and http. Also fix base64 deprecation warning. Signed-off-by: Omar Zabala-Ferrera <73452461+ozabalaferrera@users.noreply.github.com> --- Cargo.toml | 6 +++--- README.md | 2 +- example-projects/rdkafka-example/Cargo.toml | 4 ++-- src/event/attributes.rs | 3 ++- src/lib.rs | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a761a06..17521c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudevents-sdk" -version = "0.8.0" +version = "0.9.0" authors = ["Francesco Guardiani "] license-file = "LICENSE" edition = "2018" @@ -48,12 +48,12 @@ uuid = { version = "1", features = ["v4"] } actix-web = { version = "4", optional = true } actix-http = { version = "3", optional = true } reqwest-lib = { version = "^0.12", default-features = false, features = ["rustls-tls"], optional = true, package = "reqwest" } -rdkafka-lib = { version = "^0.36", features = ["cmake-build"], optional = true, package = "rdkafka" } +rdkafka-lib = { version = "^0.37", features = ["cmake-build"], optional = true, package = "rdkafka" } warp-lib = { version = "^0.3", optional = true, package = "warp" } async-trait = { version = "^0.1", optional = true } bytes = { version = "^1.0", optional = true } futures = { version = "^0.3", optional = true, features = ["compat"]} -http = { version = "1.1", optional = true} +http = { version = "1.2", optional = true} http-0-2 = { version = "0.2", optional = true, package = "http"} axum-lib = { version = "^0.7", optional = true, package="axum"} http-body-util = {version = "^0.1", optional = true} diff --git a/README.md b/README.md index 3c8d06f..ecd8886 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ enabling your Protocol Binding of choice: ```toml [dependencies] -cloudevents-sdk = { version = "0.8.0" } +cloudevents-sdk = { version = "0.9.0" } ``` Now you can start creating events: diff --git a/example-projects/rdkafka-example/Cargo.toml b/example-projects/rdkafka-example/Cargo.toml index 802021f..5ffd47a 100644 --- a/example-projects/rdkafka-example/Cargo.toml +++ b/example-projects/rdkafka-example/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rdkafka-example" -version = "0.3.0" +version = "0.4.0" authors = ["Pranav Bhatt "] edition = "2018" @@ -16,4 +16,4 @@ serde_json = "^1.0" futures = "^0.3" tokio = { version = "^1.0", features = ["full"] } clap = "2.33.1" -rdkafka = { version = "^0.36", features = ["cmake-build"] } +rdkafka = { version = "^0.37", features = ["cmake-build"] } diff --git a/src/event/attributes.rs b/src/event/attributes.rs index 04acb56..eaff8ac 100644 --- a/src/event/attributes.rs +++ b/src/event/attributes.rs @@ -2,6 +2,7 @@ use super::{ AttributesIntoIteratorV03, AttributesIntoIteratorV10, AttributesV03, AttributesV10, ExtensionValue, SpecVersion, UriReference, }; +use base64::prelude::*; use chrono::{DateTime, Utc}; use serde::Serializer; use std::fmt; @@ -37,7 +38,7 @@ impl fmt::Display for AttributeValue<'_> { AttributeValue::Boolean(b) => f.serialize_bool(**b), AttributeValue::Integer(i) => f.serialize_i64(**i), AttributeValue::String(s) => f.write_str(s), - AttributeValue::Binary(b) => f.write_str(&base64::encode(b)), + AttributeValue::Binary(b) => f.write_str(&BASE64_STANDARD.encode(b)), AttributeValue::URI(s) => f.write_str(s.as_str()), AttributeValue::URIRef(s) => f.write_str(s.as_str()), AttributeValue::Time(s) => f.write_str(&s.to_rfc3339()), diff --git a/src/lib.rs b/src/lib.rs index d0a5dcc..7d19c38 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,7 +54,7 @@ //! [Extractors]: https://actix.rs/docs/extractors/ //! [Responders]: https://actix.rs/docs/handlers/ -#![doc(html_root_url = "https://docs.rs/cloudevents-sdk/0.8.0")] +#![doc(html_root_url = "https://docs.rs/cloudevents-sdk/0.9.0")] #![deny(rustdoc::broken_intra_doc_links)] #![cfg_attr(docsrs, feature(doc_cfg))] // Show feature gate in doc