We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8d2bff commit f703349Copy full SHA for f703349
src/response_body.rs
@@ -142,6 +142,12 @@ impl<const LEN: usize> From<[u8; LEN]> for ResponseBody {
142
ResponseBody::Vec(b.to_vec())
143
}
144
145
+#[cfg(feature = "include_dir")]
146
+impl From<&'static include_dir::File<'static>> for ResponseBody {
147
+ fn from(file: &'static include_dir::File<'static>) -> Self {
148
+ ResponseBody::StaticBytes(file.contents())
149
+ }
150
+}
151
impl PartialEq for ResponseBody {
152
fn eq(&self, other: &Self) -> bool {
153
#[allow(clippy::match_same_arms)]
0 commit comments