summaryrefslogtreecommitdiffstats
path: root/src/librustdoc/config.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:37 +0000
commit246f239d9f40f633160f0c18f87a20922d4e77bb (patch)
tree5a88572663584b3d4d28e5a20e10abab1be40884 /src/librustdoc/config.rs
parentReleasing progress-linux version 1.64.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-246f239d9f40f633160f0c18f87a20922d4e77bb.tar.xz
rustc-246f239d9f40f633160f0c18f87a20922d4e77bb.zip
Merging debian version 1.65.0+dfsg1-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/librustdoc/config.rs')
-rw-r--r--src/librustdoc/config.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs
index 8a8cc272e..932533db0 100644
--- a/src/librustdoc/config.rs
+++ b/src/librustdoc/config.rs
@@ -412,7 +412,13 @@ impl Options {
let to_check = matches.opt_strs("check-theme");
if !to_check.is_empty() {
- let paths = theme::load_css_paths(static_files::themes::LIGHT.as_bytes());
+ let paths = match theme::load_css_paths(static_files::themes::LIGHT) {
+ Ok(p) => p,
+ Err(e) => {
+ diag.struct_err(&e.to_string()).emit();
+ return Err(1);
+ }
+ };
let mut errors = 0;
println!("rustdoc: [check-theme] Starting tests! (Ignoring all other arguments)");
@@ -547,7 +553,13 @@ impl Options {
let mut themes = Vec::new();
if matches.opt_present("theme") {
- let paths = theme::load_css_paths(static_files::themes::LIGHT.as_bytes());
+ let paths = match theme::load_css_paths(static_files::themes::LIGHT) {
+ Ok(p) => p,
+ Err(e) => {
+ diag.struct_err(&e.to_string()).emit();
+ return Err(1);
+ }
+ };
for (theme_file, theme_s) in
matches.opt_strs("theme").iter().map(|s| (PathBuf::from(&s), s.to_owned()))