diff --git a/stdlib/src/canvas.rs b/stdlib/src/canvas.rs index d7dee547..644dd36a 100644 --- a/stdlib/src/canvas.rs +++ b/stdlib/src/canvas.rs @@ -1,6 +1,7 @@ use crate::{StdFunction, StdlibModule, StdlibRegistry}; use std::cell::RefCell; use std::collections::HashMap; +use std::fmt::Write; use std::rc::Rc; use techscript_runtime::{ context::RuntimeContext, error::RuntimeError, function::Callable, value::RuntimeValue, @@ -132,10 +133,11 @@ fn dsl_to_svg(val: &RuntimeValue, is_dragon: bool) -> String { for i in 0..count { let r = 80 + i as i64 * (size / 2); let opacity = 0.4 - (i as f32 * 0.08); - svg.push_str(&format!( + let _ = write!( + svg, r#""#, r, color, thickness, opacity - )); + ); } } "emblem" => {