diff options
author | Charisee <chiw@google.com> | 2023-06-02 03:46:11 +0000 |
---|---|---|
committer | Charisee Chiw <chiw@google.com> | 2023-06-02 19:58:11 +0000 |
commit | 9e8af2db0081c1d100f891fe2d209efae645eff4 (patch) | |
tree | 04b066430b554e75f59c5b7e387699b91cee0762 /doh | |
parent | 9c71c8b5e8ef4acaebf1a5037b84f938fe6597a6 (diff) | |
download | DnsResolver-9e8af2db0081c1d100f891fe2d209efae645eff4.tar.gz |
Change request for Rust v1.70.0
error: redundant clone
--> packages/modules/DnsResolver/doh/config.rs:199:26
|
199 | let cache_b = cache_a.clone();
| ^^^^^^^^ help: remove this
|
note: cloned value is neither consumed nor mutated
--> packages/modules/DnsResolver/doh/config.rs:199:19
|
199 | let cache_b = cache_a.clone();
| ^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `-D clippy::redundant-clone` implied by `-D warnings`
error: aborting due to previous error
Test:./toolchain/android_rust/test_compiler.py --prebuilt-path dist/rust-dev.tar.gz --target aosp_cf_x86_64_phone
Bug: 285036397
Change-Id: Ifc7e3efa593262feac0d2f5b292e4ba64d305600
Diffstat (limited to 'doh')
-rw-r--r-- | doh/config.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/doh/config.rs b/doh/config.rs index 8aaaa46b..cc818f69 100644 --- a/doh/config.rs +++ b/doh/config.rs @@ -196,12 +196,11 @@ fn create_quiche_config() { #[test] fn shared_cache() { let cache_a = Cache::new(); - let cache_b = cache_a.clone(); let config_a = cache_a .get(&Key { cert_path: None, max_idle_timeout: 1000, enable_early_data: true }) .unwrap(); assert_eq!(Arc::strong_count(&config_a.0), 2); - let _config_b = cache_b + let _config_b = cache_a .get(&Key { cert_path: None, max_idle_timeout: 1000, enable_early_data: true }) .unwrap(); assert_eq!(Arc::strong_count(&config_a.0), 3); |