Add optional attributes

This commit is contained in:
Evan Almloff committed 2023-09-18 19:50:02 -05:00
1 parent 9f1c735cf1
commit d297e2baa2
6 files changed
+171 -57

No files matched your search

+6
View File
@@ -791,6 +791,12 @@ impl<'a> IntoAttributeValue<'a> for &'a str {
}
}
impl<'a> IntoAttributeValue<'a> for String {
fn into_value(self, bump: &'a Bump) -> AttributeValue<'a> {
AttributeValue::Text(bump.alloc(self))
}
}
impl<'a> IntoAttributeValue<'a> for f64 {
fn into_value(self, _: &'a Bump) -> AttributeValue<'a> {
AttributeValue::Float(self)