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


34649856 pyros2097

6 years ago
v5.0.1
Files changed (1) hide show
  1. impl/src/lib.rs +2 -2
impl/src/lib.rs CHANGED
@@ -108,8 +108,8 @@ fn impl_rust_embed(ast: &syn::DeriveInput) -> Tokens {
108
108
  match ast.body {
109
109
  Body::Enum(_) => panic!("RustEmbed cannot be derived for enums"),
110
110
  Body::Struct(ref data) => match data {
111
+ &VariantData::Unit => {},
111
- &VariantData::Struct(_) => panic!("RustEmbed can only be derived for unit structs"),
112
+ _ => panic!("RustEmbed can only be derived for unit structs")
112
- _ => {}
113
113
  },
114
114
  };
115
115