~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git

rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.


5655966b Liran Piade

9 months ago
Ensure examples/missing is missing
Files changed (1) hide show
  1. tests/allow_missing.rs +4 -0
tests/allow_missing.rs CHANGED
@@ -1,3 +1,5 @@
1
+ use std::{path::PathBuf, str::FromStr};
2
+
1
3
  use rust_embed::Embed;
2
4
 
3
5
  #[derive(Embed)]
@@ -7,5 +9,7 @@ struct Asset;
7
9
 
8
10
  #[test]
9
11
  fn missing_is_empty() {
12
+ let path = PathBuf::from_str("./examples/missing").unwrap();
13
+ assert!(!path.exists());
10
14
  assert_eq!(Asset::iter().count(), 0);
11
15
  }