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 5cac53f commit 46efa0eCopy full SHA for 46efa0e
core/build.rs
@@ -8,7 +8,7 @@ fn main() {
8
println!("cargo::rerun-if-changed=build.rs");
9
}
10
11
- let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
+ let out_dir = PathBuf::from(std::env::var("OUT_DIR").expect("OUT_DIR not set by cargo"));
12
let built_file = out_dir.join("built.rs");
13
14
built::write_built_file().expect("Failed to acquire build-time information");
@@ -19,7 +19,8 @@ fn main() {
19
&built_file,
20
format!(
21
"{}\npub const BUILT_TIME_SQLITE: &str = \"{}\";\n",
22
- fs::read_to_string(&built_file).unwrap(),
+ fs::read_to_string(&built_file)
23
+ .expect("built.rs should exist after built::write_built_file()"),
24
sqlite_date
25
),
26
)
0 commit comments