From 2865206dda1d57df1c95dd8e49d5599db89407ae Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 25 Sep 2025 15:41:17 +0800 Subject: Fix clippy warnings and optimize code - Rename from_str to from_address_str in tcp_connection to avoid trait conflict - Use ? operator instead of let...else patterns in local and vault initialization - Replace manual string slicing with strip_prefix in virtual_file.rs - All tests continue to pass after optimizations --- .../tcp_connection/tcp_connection_test/src/test_tcp_target_build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/utils/tcp_connection/tcp_connection_test/src') diff --git a/crates/utils/tcp_connection/tcp_connection_test/src/test_tcp_target_build.rs b/crates/utils/tcp_connection/tcp_connection_test/src/test_tcp_target_build.rs index 0e1ed67..bcaada3 100644 --- a/crates/utils/tcp_connection/tcp_connection_test/src/test_tcp_target_build.rs +++ b/crates/utils/tcp_connection/tcp_connection_test/src/test_tcp_target_build.rs @@ -7,7 +7,8 @@ fn test_tcp_test_target_build() { let host = "127.0.0.1:8080"; // Test build target by string - let Ok(target) = TcpServerTarget::::from_str(host) + let Ok(target) = + TcpServerTarget::::from_address_str(host) else { panic!("Test target built failed from a target addr `{}`", host); }; -- cgit