@@ -446,16 +446,16 @@ impl TopologyDescription {
446446 server_description : ServerDescription ,
447447 ) -> Result < ( ) , String > {
448448 match server_description. server_type {
449- ServerType :: Unknown | ServerType :: RSGhost => { }
449+ ServerType :: Unknown | ServerType :: RsGhost => { }
450450 ServerType :: Standalone => {
451451 self . update_unknown_with_standalone_server ( server_description)
452452 }
453453 ServerType :: Mongos => self . topology_type = TopologyType :: Sharded ,
454- ServerType :: RSPrimary => {
454+ ServerType :: RsPrimary => {
455455 self . topology_type = TopologyType :: ReplicaSetWithPrimary ;
456456 self . update_rs_from_primary_server ( server_description) ?;
457457 }
458- ServerType :: RSSecondary | ServerType :: RSArbiter | ServerType :: RSOther => {
458+ ServerType :: RsSecondary | ServerType :: RsArbiter | ServerType :: RsOther => {
459459 self . topology_type = TopologyType :: ReplicaSetNoPrimary ;
460460 self . update_rs_without_primary_server ( server_description) ?;
461461 }
@@ -480,15 +480,15 @@ impl TopologyDescription {
480480 server_description : ServerDescription ,
481481 ) -> Result < ( ) , String > {
482482 match server_description. server_type {
483- ServerType :: Unknown | ServerType :: RSGhost => { }
483+ ServerType :: Unknown | ServerType :: RsGhost => { }
484484 ServerType :: Standalone | ServerType :: Mongos => {
485485 self . servers . remove ( & server_description. address ) ;
486486 }
487- ServerType :: RSPrimary => {
487+ ServerType :: RsPrimary => {
488488 self . topology_type = TopologyType :: ReplicaSetWithPrimary ;
489489 self . update_rs_from_primary_server ( server_description) ?
490490 }
491- ServerType :: RSSecondary | ServerType :: RSArbiter | ServerType :: RSOther => {
491+ ServerType :: RsSecondary | ServerType :: RsArbiter | ServerType :: RsOther => {
492492 self . update_rs_without_primary_server ( server_description) ?;
493493 }
494494 }
@@ -502,15 +502,15 @@ impl TopologyDescription {
502502 server_description : ServerDescription ,
503503 ) -> Result < ( ) , String > {
504504 match server_description. server_type {
505- ServerType :: Unknown | ServerType :: RSGhost => {
505+ ServerType :: Unknown | ServerType :: RsGhost => {
506506 self . record_primary_state ( ) ;
507507 }
508508 ServerType :: Standalone | ServerType :: Mongos => {
509509 self . servers . remove ( & server_description. address ) ;
510510 self . record_primary_state ( ) ;
511511 }
512- ServerType :: RSPrimary => self . update_rs_from_primary_server ( server_description) ?,
513- ServerType :: RSSecondary | ServerType :: RSArbiter | ServerType :: RSOther => {
512+ ServerType :: RsPrimary => self . update_rs_from_primary_server ( server_description) ?,
513+ ServerType :: RsSecondary | ServerType :: RsArbiter | ServerType :: RsOther => {
514514 self . update_rs_with_primary_from_member ( server_description) ?;
515515 }
516516 }
@@ -629,7 +629,7 @@ impl TopologyDescription {
629629 continue ;
630630 }
631631
632- if let ServerType :: RSPrimary = self . servers . get ( & address) . unwrap ( ) . server_type {
632+ if let ServerType :: RsPrimary = self . servers . get ( & address) . unwrap ( ) . server_type {
633633 self . servers
634634 . insert ( address. clone ( ) , ServerDescription :: new ( address, None ) ) ;
635635 }
@@ -657,7 +657,7 @@ impl TopologyDescription {
657657 self . topology_type = if self
658658 . servers
659659 . values ( )
660- . any ( |server| server. server_type == ServerType :: RSPrimary )
660+ . any ( |server| server. server_type == ServerType :: RsPrimary )
661661 {
662662 TopologyType :: ReplicaSetWithPrimary
663663 } else {
0 commit comments