@@ -60,9 +60,7 @@ pub trait AnyEq: Any + 'static {
6060
6161impl < T : Any + PartialEq > AnyEq for T {
6262 fn equals ( & self , other : & dyn Any ) -> bool {
63- other
64- . downcast_ref :: < Self > ( )
65- . map_or ( false , |that| self == that)
63+ other. downcast_ref :: < Self > ( ) == Some ( self )
6664 }
6765 fn as_any ( & self ) -> & dyn Any {
6866 self
@@ -84,7 +82,7 @@ pub enum FluentValue<'source> {
8482 Error ,
8583}
8684
87- impl < ' s > PartialEq for FluentValue < ' s > {
85+ impl PartialEq for FluentValue < ' _ > {
8886 fn eq ( & self , other : & Self ) -> bool {
8987 match ( self , other) {
9088 ( FluentValue :: String ( s) , FluentValue :: String ( s2) ) => s == s2,
@@ -95,7 +93,7 @@ impl<'s> PartialEq for FluentValue<'s> {
9593 }
9694}
9795
98- impl < ' s > Clone for FluentValue < ' s > {
96+ impl Clone for FluentValue < ' _ > {
9997 fn clone ( & self ) -> Self {
10098 match self {
10199 FluentValue :: String ( s) => FluentValue :: String ( s. clone ( ) ) ,
@@ -291,7 +289,7 @@ impl<'source> FluentValue<'source> {
291289 }
292290}
293291
294- impl < ' source > From < String > for FluentValue < ' source > {
292+ impl From < String > for FluentValue < ' _ > {
295293 fn from ( s : String ) -> Self {
296294 FluentValue :: String ( s. into ( ) )
297295 }
0 commit comments