From bbc8da775655cd64fa45cfee8c95d8b1d2708819 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Fri, 7 Jun 2024 19:07:48 +0100 Subject: [PATCH] release 9.0.0 --- CHANGELOG.md | 12 ++++++++++-- Cargo.toml | 4 ++-- examples/futures.rs | 6 +----- src/host.rs | 5 ++--- src/nameinfo.rs | 6 ++---- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f74d6aaa..f84895e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 9.0.0 (7 June 2024) + +- use version 10.0.0 of the c-ares rust wrapper + - returns strings as `&str` and `String` rather than `CStr` and `CString` + - see + + for more detail. + ## 8.5.1 (26 May 2024) - Include the whole API in docs @@ -10,11 +18,11 @@ ## 8.4.0 (24 May 2024) -- cares 1.29.0 +- c-ares 1.29.0 ## 8.3.0 (23 February 2024) -- cares 1.27.0 +- c-ares 1.27.0 ## 8.2.0 (30 November 2023) diff --git a/Cargo.toml b/Cargo.toml index 451f97fd..9690d88f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "c-ares-resolver" license = "MIT" -version = "8.5.1" +version = "9.0.0" authors = ["David Hotham"] description = """ An asynchronous DNS resolver, backed by c-ares. @@ -24,7 +24,7 @@ include = [ features = ["vendored"] [dependencies] -c-ares = { version = "9.2.0", default-features = false } +c-ares = { version = "10.0.0", default-features = false } c-ares-sys = { version = "9.2.0", default-features = false } futures-channel = "0.3.9" polling = "3.1.0" diff --git a/examples/futures.rs b/examples/futures.rs index 1541d7c2..ede8e11c 100644 --- a/examples/futures.rs +++ b/examples/futures.rs @@ -22,11 +22,7 @@ fn main() { Ok(results) => { println!("Successful MX lookup..."); for result in &results { - println!( - "host {}, priority {}", - result.host().to_string_lossy(), - result.priority() - ); + println!("host {}, priority {}", result.host(), result.priority()); } } Err(e) => println!("MX lookup failed with error '{}'", e), diff --git a/src/host.rs b/src/host.rs index c9b92ba7..38ec7826 100644 --- a/src/host.rs +++ b/src/host.rs @@ -1,17 +1,16 @@ -use std::ffi::CString; use std::net::IpAddr; /// An owned version of `c_ares::HostResults`. #[derive(Clone, Eq, PartialEq, Debug, Hash, PartialOrd, Ord)] pub struct HostResults { /// The hostname returned by the lookup. - pub hostname: CString, + pub hostname: String, /// The IP addresses returned by the lookup. pub addresses: Vec, /// The aliases returned by the lookup. - pub aliases: Vec, + pub aliases: Vec, } impl<'a> From> for HostResults { diff --git a/src/nameinfo.rs b/src/nameinfo.rs index 139ba419..4ee24941 100644 --- a/src/nameinfo.rs +++ b/src/nameinfo.rs @@ -1,13 +1,11 @@ -use std::ffi::CString; - /// An owned version of `c_ares::NameInfoResult`. #[derive(Clone, Eq, PartialEq, Debug, Hash, PartialOrd, Ord)] pub struct NameInfoResult { /// The node returned by the lookup. - pub node: Option, + pub node: Option, /// The service returned by the lookup. - pub service: Option, + pub service: Option, } impl<'a> From> for NameInfoResult {