@@ -112,7 +112,7 @@ use like::ILike;
112112
113113macro_rules! newtype_istr {
114114 ( $typ: ident, $parse: expr, $visitor: ident) => {
115- #[ derive( Debug , Clone , Eq , PartialEq , PartialOrd , Ord , Hash ) ]
115+ #[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
116116 pub struct $typ( Arc <str >) ;
117117
118118 impl $typ {
@@ -132,7 +132,7 @@ macro_rules! newtype_istr {
132132 Self ( s)
133133 }
134134
135- pub fn into_lowercase< ' a> ( s: & ' a str ) -> Cow <' a , str > {
135+ pub fn into_lowercase( s: & str ) -> Cow <' _ , str > {
136136 let bytes = s. as_bytes( ) ;
137137 if !bytes. iter( ) . any( u8 :: is_ascii_uppercase) {
138138 Cow :: Borrowed ( s)
@@ -268,20 +268,10 @@ impl DatasetAliasPattern {
268268 }
269269
270270 pub fn matches ( & self , dataset_handle : & DatasetHandle ) -> bool {
271- if self . account_name . is_some ( ) && dataset_handle. alias . account_name . is_none ( )
272- || self . account_name . is_none ( ) && dataset_handle. alias . account_name . is_some ( )
273- {
274- return false ;
275- }
276- if self . account_name . as_ref ( ) . unwrap ( )
277- == dataset_handle. alias . account_name . as_ref ( ) . unwrap ( )
271+ self . account_name == dataset_handle. alias . account_name
278272 && self
279273 . dataset_name_pattern
280274 . matches ( & dataset_handle. alias . dataset_name )
281- {
282- return true ;
283- }
284- false
285275 }
286276}
287277
@@ -332,7 +322,7 @@ newtype_istr!(RepoName, Grammar::match_repo_name, RepoNameSerdeVisitor);
332322
333323////////////////////////////////////////////////////////////////////////////////
334324
335- #[ derive( Debug , Clone , Eq , PartialEq , PartialOrd , Ord , Hash ) ]
325+ #[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
336326pub struct DatasetAlias {
337327 pub account_name : Option < AccountName > ,
338328 pub dataset_name : DatasetName ,
@@ -409,7 +399,7 @@ impl_serde!(DatasetAlias, DatasetAliasSerdeVisitor);
409399
410400////////////////////////////////////////////////////////////////////////////////
411401
412- #[ derive( Debug , Clone , Eq , PartialEq , PartialOrd , Ord , Hash ) ]
402+ #[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
413403pub struct DatasetAliasRemote {
414404 pub repo_name : RepoName ,
415405 pub account_name : Option < AccountName > ,
0 commit comments