File tree 1 file changed +7
-13
lines changed
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;
8
8
#[ cfg( test) ]
9
9
mod tests;
10
10
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
-
23
11
#[ derive( Debug , Clone , Eq ) ]
24
12
pub struct CssPath {
25
13
pub name : String ,
@@ -265,7 +253,13 @@ pub fn test_theme_against<P: AsRef<Path>>(
265
253
against : & CssPath ,
266
254
diag : & Handler ,
267
255
) -> ( 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
+ } ;
269
263
270
264
let paths = load_css_paths ( & data) ;
271
265
let mut ret = vec ! [ ] ;
You can’t perform that action at this time.
0 commit comments