sixtyfps-macro: recompile when the style changes

This commit is contained in:
Olivier Goffart 2020-12-01 11:13:39 +01:00
parent e895e88e7f
commit 19458eb2e6

View file

@ -348,7 +348,10 @@ pub fn sixtyfps(stream: TokenStream) -> TokenStream {
.filter(|path| path.is_absolute() && !path.ends_with("Cargo.toml"))
.filter_map(|p| p.to_str())
.map(|p| quote! {const _ : &'static [u8] = ::core::include_bytes!(#p);});
result.as_mut().map(|x| x.extend(reload));
result.as_mut().map(|x| {
x.extend(reload);
x.extend(quote! {const _ : Option<&'static str> = ::core::option_env!("SIXTYFPS_STYLE");});
});
result
.unwrap_or_else(|| {