fix unused variable warning

This commit is contained in:
Franz Dietrich 2025-10-24 17:28:51 +02:00
parent 78ecc84493
commit 8128c212ae
2 changed files with 4 additions and 5 deletions

View File

@ -28,7 +28,7 @@ pub fn render_world(world: &TurtleWorld) {
for turtle in &world.turtles { for turtle in &world.turtles {
for cmd in &turtle.commands { for cmd in &turtle.commands {
match cmd { match cmd {
DrawCommand::Mesh { data, source } => { DrawCommand::Mesh { data, source: _ } => {
// Rendering wie bisher // Rendering wie bisher
draw_mesh(&data.to_mesh()); draw_mesh(&data.to_mesh());
// Hier könnte man das source für Debug/Export loggen // Hier könnte man das source für Debug/Export loggen
@ -39,7 +39,7 @@ pub fn render_world(world: &TurtleWorld) {
heading, heading,
font_size, font_size,
color, color,
source, source: _,
} => { } => {
draw_text_command(text, *position, *heading, *font_size, *color); draw_text_command(text, *position, *heading, *font_size, *color);
// Hier könnte man das source für Debug/Export loggen // Hier könnte man das source für Debug/Export loggen
@ -80,7 +80,7 @@ pub fn render_world_with_tweens(world: &TurtleWorld, zoom_level: f32) {
for turtle in &world.turtles { for turtle in &world.turtles {
for cmd in &turtle.commands { for cmd in &turtle.commands {
match cmd { match cmd {
DrawCommand::Mesh { data, source } => { DrawCommand::Mesh { data, source: _ } => {
draw_mesh(&data.to_mesh()); draw_mesh(&data.to_mesh());
} }
DrawCommand::Text { DrawCommand::Text {
@ -89,7 +89,7 @@ pub fn render_world_with_tweens(world: &TurtleWorld, zoom_level: f32) {
heading, heading,
font_size, font_size,
color, color,
source, source: _,
} => { } => {
draw_text_command(text, *position, *heading, *font_size, *color); draw_text_command(text, *position, *heading, *font_size, *color);
} }

View File

@ -5,7 +5,6 @@ pub mod svg_export {
use crate::commands::TurtleCommand; use crate::commands::TurtleCommand;
use crate::export::{DrawingExporter, ExportError}; use crate::export::{DrawingExporter, ExportError};
use crate::state::{DrawCommand, TurtleWorld}; use crate::state::{DrawCommand, TurtleWorld};
use macroquad::prelude::Vec2;
use std::fs::File; use std::fs::File;
use svg::{ use svg::{
node::element::{Circle, Line, Polygon, Text as SvgText}, node::element::{Circle, Line, Polygon, Text as SvgText},