From 2d457f54f50de8a9430f1e6e3da42244957911d1 Mon Sep 17 00:00:00 2001 From: René Kijewski Date: Thu, 3 Feb 2022 14:55:33 +0100 Subject: Replace custom Cow with actual Cow --- askama_derive/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'askama_derive') diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs index cc50ac8..4d81433 100644 --- a/askama_derive/src/lib.rs +++ b/askama_derive/src/lib.rs @@ -86,13 +86,14 @@ fn find_used_templates( let extends = input.config.find_template(extends, Some(&path))?; let dependency_path = (path.clone(), extends.clone()); if dependency_graph.contains(&dependency_path) { - return Err(CompileError::String(format!( + return Err(format!( "cyclic dependecy in graph {:#?}", dependency_graph .iter() .map(|e| format!("{:#?} --> {:#?}", e.0, e.1)) .collect::>() - ))); + ) + .into()); } dependency_graph.push(dependency_path); let source = get_template_source(&extends)?; -- cgit