File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,10 +126,7 @@ impl<'a> Loader for &'a ZLoad {
126126 debug ! ( "Parsing: {}" , p. as_ref( ) . display( ) ) ;
127127 let s = self . sources . alloc ( s) ;
128128 let ast = ast:: generate_ast ( s) ;
129- if ast. is_err ( ) {
130- panic ! ( "{}" , ast. unwrap_err( ) ) ;
131- }
132- Ok ( ast. unwrap ( ) )
129+ Ok ( ast. unwrap_or_else ( |e| panic ! ( "{}" , e) ) )
133130 }
134131 fn includes < P : AsRef < Path > > ( & self , ast : & Self :: AST , p : & P ) -> Vec < PathBuf > {
135132 let mut c = p. as_ref ( ) . to_path_buf ( ) ;
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ impl<'ast> ZVisitorMut<'ast> for ZConstLiteralRewriter {
9797 & mut self ,
9898 dle : & mut ast:: DecimalLiteralExpression < ' ast > ,
9999 ) -> ZVisitorResult {
100+ #![ allow( clippy:: unnecessary_unwrap) ]
100101 if dle. suffix . is_none ( ) && self . to_ty . is_some ( ) {
101102 self . found = true ;
102103 dle. suffix . replace ( match self . to_ty . as_ref ( ) . unwrap ( ) {
Original file line number Diff line number Diff line change @@ -126,10 +126,7 @@ impl<'a> Loader for &'a ZLoad {
126126 debug ! ( "Parsing: {}" , p. as_ref( ) . display( ) ) ;
127127 let s = self . sources . alloc ( s) ;
128128 let ast = ast:: generate_ast ( s) ;
129- if ast. is_err ( ) {
130- panic ! ( "{}" , ast. unwrap_err( ) ) ;
131- }
132- Ok ( ast. unwrap ( ) )
129+ Ok ( ast. unwrap_or_else ( |e| panic ! ( "{}" , e) ) )
133130 }
134131 fn includes < P : AsRef < Path > > ( & self , ast : & Self :: AST , p : & P ) -> Vec < PathBuf > {
135132 let mut c = p. as_ref ( ) . to_path_buf ( ) ;
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ impl<'ast> ZVisitorMut<'ast> for ZConstLiteralRewriter {
113113 & mut self ,
114114 dle : & mut ast:: DecimalLiteralExpression < ' ast > ,
115115 ) -> ZVisitorResult {
116+ #![ allow( clippy:: unnecessary_unwrap) ]
116117 if dle. suffix . is_none ( ) && self . to_ty . is_some ( ) {
117118 self . found = true ;
118119 dle. suffix . replace ( match self . to_ty . as_ref ( ) . unwrap ( ) {
Original file line number Diff line number Diff line change 2020//! * [Computation]: a collection of variables and assertions about them
2121//! * [Value]: a variable-free (and evaluated) term
2222//!
23+ #![ allow( clippy:: derive_ord_xor_partial_ord) ]
2324
2425use circ_fields:: { FieldT , FieldV } ;
2526pub use circ_hc:: { Node , Table , Weak } ;
@@ -795,7 +796,6 @@ impl Array {
795796impl std:: cmp:: Eq for Value { }
796797// We walk in danger here, intentionally. One day we may fix it.
797798// FP is the heart of the problem.
798- #[ allow( clippy:: derive_ord_xor_partial_ord) ]
799799impl std:: cmp:: Ord for Value {
800800 fn cmp ( & self , o : & Self ) -> std:: cmp:: Ordering {
801801 self . partial_cmp ( o) . expect ( "broken Value cmp" )
You can’t perform that action at this time.
0 commit comments