diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96708961d..06df67deb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: branches: [master] env: - rust_version: 1.61.0 + rust_version: 1.69.0 jobs: lint: diff --git a/Cargo.toml b/Cargo.toml index e190bd18e..064c7ec08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ keywords = ["kafka", "rdkafka"] categories = ["api-bindings"] edition = "2018" exclude = ["Cargo.lock"] -rust-version = "1.61" +rust-version = "1.69" [workspace] members = ["rdkafka-sys"] diff --git a/README.md b/README.md index 6070ef6a7..cb44723f3 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ re-exported as rdkafka features. ### Minimum supported Rust version (MSRV) -The current minimum supported Rust version (MSRV) is 1.61.0. Note that +The current minimum supported Rust version (MSRV) is 1.69.0. Note that bumping the MSRV is not considered a breaking change. Any release of rust-rdkafka may bump the MSRV. diff --git a/changelog.md b/changelog.md index 1806d5807..c9610a36b 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,8 @@ See also the [rdkafka-sys changelog](rdkafka-sys/changelog.md). ## Unreleased +* Bump MSRV to 1.69 + ## 0.36.2 (2024-01-16) * Update `BaseConsumer::poll` to return `None` when handling rebalance diff --git a/rdkafka-sys/Cargo.toml b/rdkafka-sys/Cargo.toml index 4870e15b3..ea937216e 100644 --- a/rdkafka-sys/Cargo.toml +++ b/rdkafka-sys/Cargo.toml @@ -10,7 +10,7 @@ description = "Native bindings to the librdkafka library" keywords = ["kafka", "rdkafka"] categories = ["external-ffi-bindings"] edition = "2018" -rust-version = "1.61" +rust-version = "1.69" [dependencies] num_enum = "0.5.0" diff --git a/src/config.rs b/src/config.rs index 296d9f867..29a83863c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -150,7 +150,10 @@ impl NativeClientConfig { } // Convert the C string to a Rust string. - Ok(String::from_utf8_lossy(&buf).to_string()) + Ok(CStr::from_bytes_until_nul(&buf) + .expect("rd_kafka_conf_get to write a NUL-terminated string.") + .to_string_lossy() + .to_string()) } } diff --git a/src/lib.rs b/src/lib.rs index 79a8d113f..8854adc92 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -176,7 +176,7 @@ //! //! ### Minimum supported Rust version (MSRV) //! -//! The current minimum supported Rust version (MSRV) is 1.61.0. Note that +//! The current minimum supported Rust version (MSRV) is 1.69.0. Note that //! bumping the MSRV is not considered a breaking change. Any release of //! rust-rdkafka may bump the MSRV. //!