~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git
Discussions: https://groups.google.com/g/rust-embed-devs

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


Files changed (1) hide show
  1. tests/prefix.rs +6 -6
tests/prefix.rs CHANGED
@@ -7,18 +7,18 @@ struct Asset;
7
7
 
8
8
  #[test]
9
9
  fn get_with_prefix() {
10
- assert!(Asset::get("prefix/index.html").is_some());
10
+ assert!(Asset::get("prefix/index.html").is_some());
11
11
  }
12
12
 
13
13
  #[test]
14
14
  fn get_without_prefix() {
15
- assert!(Asset::get("index.html").is_none());
15
+ assert!(Asset::get("index.html").is_none());
16
16
  }
17
17
 
18
18
  #[test]
19
19
  fn iter_values_have_prefix() {
20
- for file in Asset::iter() {
20
+ for file in Asset::iter() {
21
- assert!(file.starts_with("prefix/"));
21
+ assert!(file.starts_with("prefix/"));
22
- assert!(Asset::get(file.as_ref()).is_some());
22
+ assert!(Asset::get(file.as_ref()).is_some());
23
- }
23
+ }
24
24
  }