@@ -538,13 +538,13 @@ where
538
538
}
539
539
}
540
540
541
- /// Structs that has `ReReference `
541
+ /// Structs that has `Reference `
542
542
/// You should use this when you want to avoid specifying types using `match_name_type_mut`
543
543
#[ cfg( feature = "alloc" ) ]
544
544
pub trait Referenceable : Named {
545
- /// Return the `ReReference `
546
- fn type_ref ( & self ) -> ReReference < Self > {
547
- ReReference {
545
+ /// Return the `Reference `
546
+ fn type_ref ( & self ) -> Reference < Self > {
547
+ Reference {
548
548
name : Named :: name ( self ) . clone ( ) ,
549
549
phantom : PhantomData ,
550
550
}
@@ -557,31 +557,31 @@ impl<N> Referenceable for N where N: Named {}
557
557
/// Empty object with the type T
558
558
#[ derive( Debug ) ]
559
559
#[ cfg( feature = "alloc" ) ]
560
- pub struct ReReference < T : ?Sized > {
560
+ pub struct Reference < T : ?Sized > {
561
561
name : Cow < ' static , str > ,
562
562
phantom : PhantomData < T > ,
563
563
}
564
564
565
- /// Search using `ReReference `
565
+ /// Search using `Reference `
566
566
#[ cfg( feature = "alloc" ) ]
567
567
pub trait MatchNameRef {
568
- /// Search using name and `ReReference `
569
- fn match_by_ref < T > ( & self , rf : ReReference < T > ) -> Option < & T > ;
568
+ /// Search using name and `Reference `
569
+ fn match_by_ref < T > ( & self , rf : Reference < T > ) -> Option < & T > ;
570
570
571
- /// Search using name and `ReReference `
572
- fn match_by_ref_mut < T > ( & mut self , rf : ReReference < T > ) -> Option < & mut T > ;
571
+ /// Search using name and `Reference `
572
+ fn match_by_ref_mut < T > ( & mut self , rf : Reference < T > ) -> Option < & mut T > ;
573
573
}
574
574
575
575
#[ cfg( feature = "alloc" ) ]
576
576
impl < M > MatchNameRef for M
577
577
where
578
578
M : MatchName ,
579
579
{
580
- fn match_by_ref < T > ( & self , rf : ReReference < T > ) -> Option < & T > {
580
+ fn match_by_ref < T > ( & self , rf : Reference < T > ) -> Option < & T > {
581
581
self . match_name :: < T > ( & rf. name )
582
582
}
583
583
584
- fn match_by_ref_mut < T > ( & mut self , rf : ReReference < T > ) -> Option < & mut T > {
584
+ fn match_by_ref_mut < T > ( & mut self , rf : Reference < T > ) -> Option < & mut T > {
585
585
self . match_name_mut :: < T > ( & rf. name )
586
586
}
587
587
}
0 commit comments