fixed typos & formatting
This commit is contained in:
parent
1a81ce8376
commit
7b110a43b4
@ -12,7 +12,7 @@ enum EmbedMode {
|
|||||||
Str,
|
Str,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[proc_macro_derive(Embed, attributes(dir,mode))]
|
#[proc_macro_derive(Embed, attributes(dir, mode))]
|
||||||
pub fn embed(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
pub fn embed(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||||
let input = parse_macro_input!(input as DeriveInput);
|
let input = parse_macro_input!(input as DeriveInput);
|
||||||
|
|
||||||
|
@ -25,10 +25,9 @@ fn byte_read_content() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn byte_parse_string() {
|
fn byte_parse_string() {
|
||||||
let file: &[u8] = Assets::get("file1.txt").expect("Can't find file");
|
let file: &[u8] = Assets::get("file1.txt").expect("Can't find file");
|
||||||
|
|
||||||
let string = str::from_utf8(file).expect("Failed to parse file");
|
let string = str::from_utf8(file).expect("Failed to parse file");
|
||||||
|
|
||||||
println!("{string}");
|
assert_eq!(string, "file1");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user