aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-12-23 01:12:27 +0000
committermat <git@matdoes.dev>2024-12-23 01:12:27 +0000
commit3b1fe490b01258b370d58e70c71945f522010639 (patch)
tree512ae2513109f53efc1ab7c7800bfc7ef3bf4e6e /azalea-protocol
parent478fe722f58137634525dc4ae1a8a9bdc9cc32fa (diff)
downloadazalea-drasl-3b1fe490b01258b370d58e70c71945f522010639.tar.xz
make testbot take cli args
Diffstat (limited to 'azalea-protocol')
-rw-r--r--azalea-protocol/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
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<String> for ServerAddress {
+ type Error = String;
+
+ fn try_from(string: String) -> Result<Self, Self::Error> {
+ ServerAddress::try_from(string.as_str())
+ }
+}
impl From<SocketAddr> for ServerAddress {
/// Convert an existing `SocketAddr` into a `ServerAddress`. This just