Skip to content

Commit 13f00bd

Browse files
authored
Add Clone to HickoryDnsResolver and TokioDnsResolver (#4289)
## Description <!--- Describe your changes in detail --> The `HickoryDnsResolver` and `TokioDnsResolver` were not `Clone` making it impossible to use them in the http_client builder's `build_with_resolver` method. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "client," "server," or both in the `applies_to` key. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
1 parent 5550f44 commit 13f00bd

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

.changelog/dns-clone.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
applies_to: ["client"]
3+
authors: ["landonxjames"]
4+
references: ["smithy-rs#4274"]
5+
breaking: false
6+
new_feature: false
7+
bug_fix: true
8+
---
9+
The `HickoryDnsResolver` and `TokioDnsResolver` were not `Clone` making it impossible to use them in the http_client builder's `build_with_resolver` method.

rust-runtime/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust-runtime/aws-smithy-dns/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-smithy-dns"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
authors = [
55
"AWS Rust SDK Team <[email protected]>",
66
]

rust-runtime/aws-smithy-dns/src/hickory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use hickory_resolver::{
2020
///
2121
/// This resolver requires a [tokio] runtime to function and isn't available for WASM targets.
2222
#[non_exhaustive]
23-
#[derive(Debug)]
23+
#[derive(Debug, Clone)]
2424
pub struct HickoryDnsResolver {
2525
resolver: Resolver<TokioConnectionProvider>,
2626
}

rust-runtime/aws-smithy-runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-smithy-runtime"
3-
version = "1.9.1"
3+
version = "1.9.2"
44
authors = ["AWS Rust SDK Team <[email protected]>", "Zelda Hessler <[email protected]>"]
55
description = "The new smithy runtime crate"
66
edition = "2021"

rust-runtime/aws-smithy-runtime/src/client/dns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod tokio {
1515
///
1616
/// This implementation isn't available for WASM targets.
1717
#[non_exhaustive]
18-
#[derive(Debug, Default)]
18+
#[derive(Debug, Default, Clone)]
1919
pub struct TokioDnsResolver;
2020

2121
impl TokioDnsResolver {

0 commit comments

Comments
 (0)