This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +178
-207
lines changed Expand file tree Collapse file tree 2 files changed +178
-207
lines changed Original file line number Diff line number Diff line change @@ -412,7 +412,13 @@ impl Options {
412412
413413 let to_check = matches. opt_strs ( "check-theme" ) ;
414414 if !to_check. is_empty ( ) {
415- let paths = theme:: load_css_paths ( static_files:: themes:: LIGHT . as_bytes ( ) ) ;
415+ let paths = match theme:: load_css_paths ( static_files:: themes:: LIGHT ) {
416+ Ok ( p) => p,
417+ Err ( e) => {
418+ diag. struct_err ( & e. to_string ( ) ) . emit ( ) ;
419+ return Err ( 1 ) ;
420+ }
421+ } ;
416422 let mut errors = 0 ;
417423
418424 println ! ( "rustdoc: [check-theme] Starting tests! (Ignoring all other arguments)" ) ;
@@ -547,7 +553,13 @@ impl Options {
547553
548554 let mut themes = Vec :: new ( ) ;
549555 if matches. opt_present ( "theme" ) {
550- let paths = theme:: load_css_paths ( static_files:: themes:: LIGHT . as_bytes ( ) ) ;
556+ let paths = match theme:: load_css_paths ( static_files:: themes:: LIGHT ) {
557+ Ok ( p) => p,
558+ Err ( e) => {
559+ diag. struct_err ( & e. to_string ( ) ) . emit ( ) ;
560+ return Err ( 1 ) ;
561+ }
562+ } ;
551563
552564 for ( theme_file, theme_s) in
553565 matches. opt_strs ( "theme" ) . iter ( ) . map ( |s| ( PathBuf :: from ( & s) , s. to_owned ( ) ) )
You can’t perform that action at this time.
0 commit comments