clippy updates for Rust 1.66

This commit is contained in:
Benjamin Fry 2022-12-20 13:47:19 -08:00
parent ee45c2b970
commit 013307146d
8 changed files with 10 additions and 5 deletions

View File

@ -36,7 +36,7 @@ fn test_example_https_toml_startup() {
let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned());
println!("using server src path: {}", server_path);
File::open(&format!(
File::open(format!(
"{}/tests/test-data/named_test_configs/sec/example.cert",
server_path
))

View File

@ -28,7 +28,7 @@ fn test_example_quic_toml_startup() {
let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned());
println!("using server src path: {server_path} and quic_port: {quic_port:?}");
File::open(&format!(
File::open(format!(
"{}/tests/test-data/named_test_configs/sec/example.cert",
server_path
))

View File

@ -37,7 +37,7 @@ fn test_example_tls_toml_startup() {
let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned());
println!("using server src path: {}", server_path);
File::open(&format!(
File::open(format!(
"{}/tests/test-data/named_test_configs/sec/example.cert",
server_path
))

View File

@ -43,7 +43,7 @@ where
let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned());
println!("using server src path: {}", server_path);
let mut command = Command::new(&format!("{}/target/debug/trust-dns", server_path));
let mut command = Command::new(format!("{}/target/debug/trust-dns", server_path));
command
.stdout(Stdio::piped())
.env(

View File

@ -5,6 +5,8 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
#![allow(clippy::print_stdout)] // this is a test module
use std::{env, net::SocketAddr, path::Path, str::FromStr, sync::Arc};
use futures_util::StreamExt;

View File

@ -1,5 +1,7 @@
//! Tests for TCP and UDP stream and client
#![allow(clippy::print_stdout)] // this is a test module
mod tcp;
mod udp;

View File

@ -96,6 +96,7 @@ impl Resolver {
/// # Returns
///
/// A new `Resolver` or an error if there was an error with the configuration.
#[allow(clippy::should_implement_trait)]
pub fn default() -> io::Result<Self> {
Self::new(ResolverConfig::default(), ResolverOpts::default())
}

View File

@ -85,7 +85,7 @@ pub fn main() {
let mut public_key_file = OpenOptions::new()
.write(true)
.create_new(true)
.open(&output_path)
.open(output_path)
.expect("could not open public_key file for writing");
public_key_file