Turns out I was wrong, the @size helper attempts to cast to a number regardless of the input and it uses that. Fixed the test.
This commit is contained in:
@@ -141,32 +141,6 @@ impl<'a> IntoContextElement for RValue<'a> {
|
||||
.map(|ice| ice.into_context_element(renderer, breadcrumbs))
|
||||
.ok()
|
||||
.flatten(),
|
||||
// Special case: if the template is only a reference to a
|
||||
// single variable without any additional text, then
|
||||
// simply resolve that variable.
|
||||
//
|
||||
// TODO: What if the reference has filters?
|
||||
// RValue::RVTemplate(template)
|
||||
// if template.len() == 1
|
||||
// && template.iter().all(|pne| match pne {
|
||||
// PartialNameElement::PNReference { .. } => true,
|
||||
// PartialNameElement::PNSpan { .. } => false,
|
||||
// }) =>
|
||||
// {
|
||||
// let path = match template
|
||||
// .first()
|
||||
// .expect("Match guard proves theres one element")
|
||||
// {
|
||||
// PartialNameElement::PNReference { path, .. } => path,
|
||||
// PartialNameElement::PNSpan { .. } => {
|
||||
// panic!("Match guard prevents spans from hitting this code")
|
||||
// }
|
||||
// };
|
||||
// walk_path(breadcrumbs, &path)
|
||||
// .map(|ice| ice.into_context_element(renderer, breadcrumbs))
|
||||
// .ok()
|
||||
// .flatten()
|
||||
// }
|
||||
RValue::RVTemplate(template) => renderer
|
||||
.render_partial_name(template, breadcrumbs)
|
||||
.map(|rendered| OwnedLiteral::LString(rendered))
|
||||
|
||||
Reference in New Issue
Block a user