fix: Silence build warnings
This commit is contained in:
@@ -11,7 +11,7 @@ class FilterNode : NodeType {
|
||||
|
||||
let blocks = try parser.parse(until(["endfilter"]))
|
||||
|
||||
guard let token = parser.nextToken() else {
|
||||
guard parser.nextToken() != nil else {
|
||||
throw TemplateSyntaxError("`endfilter` was not found.")
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class Template: ExpressibleByStringLiteral {
|
||||
|
||||
/// Render the given template with a context
|
||||
func render(_ context: Context) throws -> String {
|
||||
let context = context ?? Context(environment: environment)
|
||||
let context = context
|
||||
let parser = TokenParser(tokens: tokens, namespace: context.namespace)
|
||||
let nodes = try parser.parse()
|
||||
return try renderNodes(nodes, context)
|
||||
|
||||
Reference in New Issue
Block a user