File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -8,18 +8,6 @@ use rustc_errors::Handler;
88#[ cfg( test) ]
99mod tests;
1010
11- macro_rules! try_something {
12- ( $e: expr, $diag: expr, $out: expr) => { {
13- match $e {
14- Ok ( c) => c,
15- Err ( e) => {
16- $diag. struct_err( & e. to_string( ) ) . emit( ) ;
17- return $out;
18- }
19- }
20- } } ;
21- }
22-
2311#[ derive( Debug , Clone , Eq ) ]
2412pub struct CssPath {
2513 pub name : String ,
@@ -265,7 +253,13 @@ pub fn test_theme_against<P: AsRef<Path>>(
265253 against : & CssPath ,
266254 diag : & Handler ,
267255) -> ( bool , Vec < String > ) {
268- let data = try_something ! ( fs:: read( f) , diag, ( false , vec![ ] ) ) ;
256+ let data = match fs:: read ( f) {
257+ Ok ( c) => c,
258+ Err ( e) => {
259+ diag. struct_err ( & e. to_string ( ) ) . emit ( ) ;
260+ return ( false , vec ! [ ] ) ;
261+ }
262+ } ;
269263
270264 let paths = load_css_paths ( & data) ;
271265 let mut ret = vec ! [ ] ;
You can’t perform that action at this time.
0 commit comments