Remove unnecessary manual Default implementations
Signed-off-by: Jacob Kiers <code@kiers.eu>
This commit is contained in:
		| @@ -45,22 +45,16 @@ pub enum Upstream { | ||||
|     Proxy(ProxyToUpstream), | ||||
| } | ||||
|  | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, Default)] | ||||
| struct Addr(Mutex<UpstreamAddress>); | ||||
|  | ||||
| impl Default for Addr { | ||||
|     fn default() -> Self { | ||||
|         Self(Default::default()) | ||||
|     } | ||||
| } | ||||
|  | ||||
| impl Clone for Addr { | ||||
|     fn clone(&self) -> Self { | ||||
|         tokio::task::block_in_place(|| Self(Mutex::new(self.0.blocking_lock().clone()))) | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[derive(Debug, Clone, Deserialize)] | ||||
| #[derive(Debug, Clone, Deserialize, Default)] | ||||
| pub struct ProxyToUpstream { | ||||
|     pub name: String, | ||||
|     pub addr: String, | ||||
| @@ -76,17 +70,6 @@ impl ProxyToUpstream { | ||||
|     } | ||||
| } | ||||
|  | ||||
| impl Default for ProxyToUpstream { | ||||
|     fn default() -> Self { | ||||
|         Self { | ||||
|             name: Default::default(), | ||||
|             addr: Default::default(), | ||||
|             protocol: Default::default(), | ||||
|             addresses: Default::default(), | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[derive(Debug)] | ||||
| pub enum ConfigError { | ||||
|     IO(IOError), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user