Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4615,8 +4615,8 @@ dependencies = [
"itertools 0.9.0",
"minifier",
"pulldown-cmark 0.8.0",
"rayon",
"regex",
"rustc-rayon",
"rustdoc-json-types",
"serde",
"serde_json",
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ path = "lib.rs"
arrayvec = { version = "0.7", default-features = false }
pulldown-cmark = { version = "0.8", default-features = false }
minifier = "0.0.41"
rayon = { version = "0.3.0", package = "rustc-rayon" }
rayon = "1.3.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
smallvec = "1.6.1"
Expand Down
11 changes: 1 addition & 10 deletions src/librustdoc/docfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ use std::path::{Path, PathBuf};
use std::string::ToString;
use std::sync::mpsc::Sender;

macro_rules! try_err {
($e:expr, $file:expr) => {
match $e {
Ok(e) => e,
Err(e) => return Err(E::new(e, $file)),
}
};
}

crate trait PathError {
fn new<S, P: AsRef<Path>>(e: S, path: P) -> Self
where
Expand Down Expand Up @@ -75,7 +66,7 @@ impl DocFS {
});
});
} else {
try_err!(fs::write(&path, contents), path);
fs::write(&path, contents).map_err(|e| E::new(e, path))?;
}
Ok(())
}
Expand Down