~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.


e43967d9 BBaoVanC

2 years ago
Run rustfmt
Files changed (1) hide show
  1. utils/src/lib.rs +5 -1
utils/src/lib.rs CHANGED
@@ -101,7 +101,11 @@ impl Metadata {
101
101
  #[doc(hidden)]
102
102
  #[cfg(feature = "mime-guess")]
103
103
  pub fn __rust_embed_new(hash: [u8; 32], last_modified: Option<u64>, mimetype: &'static str) -> Self {
104
+ Self {
105
+ hash,
106
+ last_modified,
104
- Self { hash, last_modified, mimetype: mimetype.into() }
107
+ mimetype: mimetype.into(),
108
+ }
105
109
  }
106
110
 
107
111
  /// The SHA256 hash of the file