Skip to content

Commit

Permalink
release 9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Jun 7, 2024
1 parent f10da0a commit bbc8da7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
<https://github.com/dimbleby/rust-c-ares/blob/main/CHANGELOG.md#1000-7-june-2024>
for more detail.

## 8.5.1 (26 May 2024)

- Include the whole API in docs
Expand All @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"
Expand Down
6 changes: 1 addition & 5 deletions examples/futures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 2 additions & 3 deletions src/host.rs
Original file line number Diff line number Diff line change
@@ -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<IpAddr>,

/// The aliases returned by the lookup.
pub aliases: Vec<CString>,
pub aliases: Vec<String>,
}

impl<'a> From<c_ares::HostResults<'a>> for HostResults {
Expand Down
6 changes: 2 additions & 4 deletions src/nameinfo.rs
Original file line number Diff line number Diff line change
@@ -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<CString>,
pub node: Option<String>,

/// The service returned by the lookup.
pub service: Option<CString>,
pub service: Option<String>,
}

impl<'a> From<c_ares::NameInfoResult<'a>> for NameInfoResult {
Expand Down

0 comments on commit bbc8da7

Please sign in to comment.