But in the blog post code snippet, it is defined twice -
/// A circle to paint#[derive(Debug,Clone,Copy)]structDot{color:Color,origin:Point,radius:f32,}/// Things that can be drawn to the screentraitNannou{fndisplay(&self,draw:&app::Draw);fnupdate(&mutself);}/// A circle to paint#[derive(Debug,Clone,Copy)]structDot{color:Color,origin:Point,radius:f32,max_radius:f32,growth_rate:f32,}
I think you need to update your blog post.
Also the gh repository seems totally different from the code given here - there are more dependencies on the gh repo.
Ah, thank you! My mistake indeed, I've removed the extra Dot declaration from the post. It compiles as written on my machine. The lower of those two declarations, with all five members, is correct.
The GitHub repo represents the code snippet at the end of this post, and does extend the Defensive Refactor snippet in a few ways. The final dependency list should look like this:
But in the blog post code snippet, it is defined twice -
I think you need to update your blog post.
Also the gh repository seems totally different from the code given here - there are more dependencies on the gh repo.
Ah, thank you! My mistake indeed, I've removed the extra
Dot
declaration from the post. It compiles as written on my machine. The lower of those two declarations, with all five members, is correct.The GitHub repo represents the code snippet at the end of this post, and does extend the Defensive Refactor snippet in a few ways. The final dependency list should look like this:
Everything other than
nannou
is added one by one throughout the post.