@@ -416,17 +416,17 @@ struct Idle<T> {
416416}
417417
418418pub enum Transport < K : Key , T : Poolable > {
419- Pooled ( Pooled < K , T > ) ,
420- UnPooled ( T ) ,
419+ TcpOrUnix ( Pooled < K , T > ) ,
420+ Shm ( T ) ,
421421}
422422
423423impl < E : Encoder , D : Decoder > Transport < Address , ThriftTransport < E , D > > {
424424 pub async fn reuse ( self ) {
425425 match self {
426- Transport :: Pooled ( pooled) => {
426+ Transport :: TcpOrUnix ( pooled) => {
427427 pooled. reuse ( ) . await ;
428428 }
429- Transport :: UnPooled ( t) => {
429+ Transport :: Shm ( t) => {
430430 t. reuse ( ) . await ;
431431 }
432432 }
@@ -435,30 +435,30 @@ impl<E: Encoder, D: Decoder> Transport<Address, ThriftTransport<E, D>> {
435435
436436impl < K : Key , T : Poolable > From < Pooled < K , T > > for Transport < K , T > {
437437 fn from ( pooled : Pooled < K , T > ) -> Self {
438- Transport :: Pooled ( pooled)
438+ Transport :: TcpOrUnix ( pooled)
439439 }
440440}
441441
442442impl < K : Key , T : Poolable > From < T > for Transport < K , T > {
443443 fn from ( t : T ) -> Self {
444- Transport :: UnPooled ( t)
444+ Transport :: Shm ( t)
445445 }
446446}
447447
448448impl < K : Key , T : Poolable > AsRef < T > for Transport < K , T > {
449449 fn as_ref ( & self ) -> & T {
450450 match self {
451- Transport :: Pooled ( pooled) => pooled. t . as_ref ( ) . expect ( "not dropped" ) ,
452- Transport :: UnPooled ( t) => t,
451+ Transport :: TcpOrUnix ( pooled) => pooled. t . as_ref ( ) . expect ( "not dropped" ) ,
452+ Transport :: Shm ( t) => t,
453453 }
454454 }
455455}
456456
457457impl < K : Key , T : Poolable > AsMut < T > for Transport < K , T > {
458458 fn as_mut ( & mut self ) -> & mut T {
459459 match self {
460- Transport :: Pooled ( pooled) => pooled. t . as_mut ( ) . expect ( "not dropped" ) ,
461- Transport :: UnPooled ( t) => t,
460+ Transport :: TcpOrUnix ( pooled) => pooled. t . as_mut ( ) . expect ( "not dropped" ) ,
461+ Transport :: Shm ( t) => t,
462462 }
463463 }
464464}
0 commit comments