@@ -8,7 +8,6 @@ use serde::ser::SerializeStruct;
88#[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Hash , Default ) ]
99#[ cfg_attr( feature = "serde" , derive( serde:: Deserialize ) ) ]
1010pub struct GenericServer {
11- pub ( crate ) server_type : ServerType ,
1211 pub ( crate ) software_type : SoftwareType ,
1312 pub ( crate ) ip : String ,
1413 pub ( crate ) port : u16 ,
@@ -21,7 +20,7 @@ pub struct GenericServer {
2120#[ allow( dead_code) ]
2221impl GenericServer {
2322 pub fn server_type ( & self ) -> ServerType {
24- self . server_type . clone ( )
23+ ServerType :: GenericServer
2524 }
2625
2726 pub fn software_type ( & self ) -> SoftwareType {
@@ -93,15 +92,14 @@ impl serde::Serialize for GenericServer {
9392#[ cfg_attr( coverage_nightly, coverage( off) ) ]
9493mod tests {
9594 use super :: * ;
96- use crate :: { Coords , GenericClient , GeoInfo , ServerType , SoftwareType } ;
95+ use crate :: { Coords , GenericClient , GeoInfo , SoftwareType } ;
9796 use pretty_assertions:: assert_eq;
9897 use quake_serverinfo:: Settings ;
9998
10099 #[ cfg( feature = "serde" ) ]
101100 #[ test]
102101 fn test_serialization ( ) -> anyhow:: Result < ( ) > {
103102 let server = GenericServer {
104- server_type : ServerType :: GenericServer ,
105103 software_type : SoftwareType :: Unknown ,
106104 ip : "10.10.10.10" . to_string ( ) ,
107105 port : 28501 ,
0 commit comments