chore: remove redundant .as_str() calls after to_string() (#20404)

This commit is contained in:
0xcharry
2025-12-16 01:10:03 +01:00
committed by GitHub
parent fec4432d82
commit 36ba6db029
3 changed files with 4 additions and 3 deletions

View File

@@ -275,6 +275,6 @@ mod tests {
let ip = NatResolver::ExternalIp(IpAddr::V4(Ipv4Addr::UNSPECIFIED));
let s = "extip:0.0.0.0";
assert_eq!(ip, s.parse().unwrap());
assert_eq!(ip.to_string().as_str(), s);
assert_eq!(ip.to_string(), s);
}
}

View File

@@ -782,10 +782,11 @@ mod tests {
let tests = vec![0, 10];
for retries in tests {
let retries_str = retries.to_string();
let args = CommandParser::<NetworkArgs>::parse_from([
"reth",
"--dns-retries",
retries.to_string().as_str(),
retries_str.as_str(),
])
.args;

View File

@@ -2342,7 +2342,7 @@ mod tests {
$(
let val: RethRpcModule = $s.parse().unwrap();
assert_eq!(val, $v);
assert_eq!(val.to_string().as_str(), $s);
assert_eq!(val.to_string(), $s);
)*
};
}