fix: Silence build warnings

This commit is contained in:
Kyle Fuller
2016-12-02 00:29:28 +00:00
parent 6d05832997
commit 2e04a71d59
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ class FilterNode : NodeType {
let blocks = try parser.parse(until(["endfilter"])) let blocks = try parser.parse(until(["endfilter"]))
guard let token = parser.nextToken() else { guard parser.nextToken() != nil else {
throw TemplateSyntaxError("`endfilter` was not found.") throw TemplateSyntaxError("`endfilter` was not found.")
} }

View File

@@ -64,7 +64,7 @@ public class Template: ExpressibleByStringLiteral {
/// Render the given template with a context /// Render the given template with a context
func render(_ context: Context) throws -> String { func render(_ context: Context) throws -> String {
let context = context ?? Context(environment: environment) let context = context
let parser = TokenParser(tokens: tokens, namespace: context.namespace) let parser = TokenParser(tokens: tokens, namespace: context.namespace)
let nodes = try parser.parse() let nodes = try parser.parse()
return try renderNodes(nodes, context) return try renderNodes(nodes, context)