rust-embed v8.11.0

#rust#proc-macro#http

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

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


7275dfbLiran Piade 2025-02-13T16:58:23+10:00
Add unit test
Files changed (1) hide show
  1. tests/allow_missing.rs +11 -0
tests/allow_missing.rs ADDED
@@ -0,0 +1,11 @@
1
+ use rust_embed::Embed;
2
+
3
+ #[derive(Embed)]
4
+ #[folder = "examples/missing/"]
5
+ #[allow_missing = true]
6
+ struct Asset;
7
+
8
+ #[test]
9
+ fn missing_is_empty() {
10
+ assert_eq!(Asset::iter().count(), 0);
11
+ }