~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.
ea7be21f
—
Samet Arık 2 years ago
Changed the "items" constant to UPPER_CASE
- impl/src/lib.rs +2 -2
impl/src/lib.rs
CHANGED
|
@@ -81,8 +81,8 @@ fn embedded(
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
fn names() -> std::slice::Iter<'static, &'static str> {
|
|
84
|
-
const
|
|
84
|
+
const ITEMS: [&str; #array_len] = [#(#list_values),*];
|
|
85
|
-
|
|
85
|
+
ITEMS.iter()
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/// Iterates over the file paths in the folder.
|