From 7be7f59d5caf38ca0cd7a12a937a2cfdca0268d7 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Thu, 23 May 2024 00:21:59 +0200 Subject: p2p: add rpc server to monitor example --- net/src/endpoint.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net/src/endpoint.rs') diff --git a/net/src/endpoint.rs b/net/src/endpoint.rs index 0c7ecd1..5aebdf9 100644 --- a/net/src/endpoint.rs +++ b/net/src/endpoint.rs @@ -238,6 +238,12 @@ impl ToEndpoint for String { } } +impl ToEndpoint for Endpoint { + fn to_endpoint(&self) -> Result { + Ok(self.clone()) + } +} + impl ToEndpoint for &str { fn to_endpoint(&self) -> Result { Endpoint::from_str(self) -- cgit v1.2.3