From 3b1fe490b01258b370d58e70c71945f522010639 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 23 Dec 2024 01:12:27 +0000 Subject: make testbot take cli args --- azalea-protocol/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'azalea-protocol/src') diff --git a/azalea-protocol/src/lib.rs b/azalea-protocol/src/lib.rs index be706ebe..5e663c8f 100644 --- a/azalea-protocol/src/lib.rs +++ b/azalea-protocol/src/lib.rs @@ -58,6 +58,13 @@ impl TryFrom<&str> for ServerAddress { Ok(ServerAddress { host, port }) } } +impl TryFrom for ServerAddress { + type Error = String; + + fn try_from(string: String) -> Result { + ServerAddress::try_from(string.as_str()) + } +} impl From for ServerAddress { /// Convert an existing `SocketAddr` into a `ServerAddress`. This just -- cgit v1.2.3