From fc333ce48f3b17ee8139bac1b3b04a1a1f75f75f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Vis=C3=A9e?= Date: Fri, 29 Dec 2017 22:50:19 +0100 Subject: [PATCH] Fix host argument --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index b2a49fb..90272ca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -128,7 +128,7 @@ fn load_image(path: &str, size: &(u32, u32)) -> DynamicImage { /// A pixflut instance struct PixCanvas { - host: &'static str, + host: String, size: (u32, u32), painter_count: usize, painters: Vec>, @@ -137,13 +137,13 @@ struct PixCanvas { impl PixCanvas { /// Create a new pixelflut canvas. - pub fn new(host: &'static str, image_path: &str, size: (u32, u32), painter_count: usize) -> PixCanvas { + pub fn new(host: &str, image_path: &str, size: (u32, u32), painter_count: usize) -> PixCanvas { // Load the image let image = load_image(image_path, &size); // Initialize the object let mut canvas = PixCanvas { - host, + host: host.to_string(), size, painter_count, painters: Vec::with_capacity(painter_count),