Fix panic string literal warnings (#1515)

This commit is contained in:
Rua 2021-03-28 12:46:55 +02:00 committed by GitHub
parent 58d19e5848
commit c38f484baa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -511,7 +511,7 @@ impl Parse for MacroInput {
let dump_lit: LitBool = input.parse()?;
dump = Some(dump_lit.value);
}
name => panic!(format!("Unknown field name: {}", name)),
name => panic!("Unknown field name: {}", name),
}
if !input.is_empty() {
@ -614,7 +614,7 @@ pub fn shader(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
&input.macro_defines,
) {
Ok(ok) => ok,
Err(e) => panic!(e.replace("(s): ", "(s):\n")),
Err(e) => panic!("{}", e.replace("(s): ", "(s):\n")),
};
codegen::reflect("Shader", content.as_binary(), input.types_meta, input.dump)