~repos /rust-embed
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.
79df0640
—
Mcat12 6 years ago
Run rustfmt
- impl/src/lib.rs +2 -3
impl/src/lib.rs
CHANGED
|
@@ -13,7 +13,6 @@ use quote::Tokens;
|
|
|
13
13
|
use std::path::Path;
|
|
14
14
|
use syn::*;
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
#[cfg(all(debug_assertions, not(feature = "debug-embed")))]
|
|
18
17
|
fn generate_assets(ident: &syn::Ident, folder_path: String) -> quote::Tokens {
|
|
19
18
|
quote! {
|
|
@@ -107,8 +106,8 @@ fn impl_rust_embed(ast: &syn::DeriveInput) -> Tokens {
|
|
|
107
106
|
match ast.body {
|
|
108
107
|
Body::Enum(_) => panic!("RustEmbed cannot be derived for enums"),
|
|
109
108
|
Body::Struct(ref data) => match data {
|
|
110
|
-
&VariantData::Unit => {}
|
|
109
|
+
&VariantData::Unit => {}
|
|
111
|
-
_ => panic!("RustEmbed can only be derived for unit structs")
|
|
110
|
+
_ => panic!("RustEmbed can only be derived for unit structs"),
|
|
112
111
|
},
|
|
113
112
|
};
|
|
114
113
|
|