We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46c24b7 commit b44d07dCopy full SHA for b44d07d
src/cargo/ops/cargo_doc.rs
@@ -62,8 +62,17 @@ pub fn doc(manifest_path: &Path,
62
}
63
64
fn build_markdown_docs(manifest_path: &Path) -> CargoResult<()> {
65
- let docs_dir = manifest_path.parent().unwrap().join("doc");
66
- let target_dir = manifest_path.parent().unwrap().join("target/doc");
+ let docs_dir = if let Some(dir) = manifest_path.parent() {
+ dir.join("doc")
67
+ } else {
68
+ return Ok(());
69
+ };
70
+
71
+ let target_dir = if let Some(dir) = manifest_path.parent() {
72
+ dir.join("target/doc")
73
74
75
76
77
try!(fs::create_dir_all(&target_dir));
78
0 commit comments