summaryrefslogtreecommitdiff
path: root/src/library/elements.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-07-10 20:42:28 +0200
committerLaurenz <laurmaedje@gmail.com>2021-07-10 23:14:46 +0200
commit891e0c5fa6cd9200c24011c33b6f2115d84d4d74 (patch)
tree3ea29dff87350d3d2020cdbb48b7acd01a33a1a2 /src/library/elements.rs
parent982ce85976913463eed6c95d3599868c5e1a79dd (diff)
Remove warnings from parsing and casting
Diffstat (limited to 'src/library/elements.rs')
-rw-r--r--src/library/elements.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/elements.rs b/src/library/elements.rs
index 6c6c66db..dd2da877 100644
--- a/src/library/elements.rs
+++ b/src/library/elements.rs
@@ -36,7 +36,7 @@ pub fn rect(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
let width = args.named(ctx, "width");
let height = args.named(ctx, "height");
let fill = args.named(ctx, "fill");
- let body = args.eat(ctx).unwrap_or_default();
+ let body = args.eat().unwrap_or_default();
rect_impl(width, height, None, fill, body)
}
@@ -46,7 +46,7 @@ pub fn square(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
let width = length.or_else(|| args.named(ctx, "width"));
let height = width.is_none().then(|| args.named(ctx, "height")).flatten();
let fill = args.named(ctx, "fill");
- let body = args.eat(ctx).unwrap_or_default();
+ let body = args.eat().unwrap_or_default();
rect_impl(width, height, Some(N64::from(1.0)), fill, body)
}
@@ -80,7 +80,7 @@ pub fn ellipse(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
let width = args.named(ctx, "width");
let height = args.named(ctx, "height");
let fill = args.named(ctx, "fill");
- let body = args.eat(ctx).unwrap_or_default();
+ let body = args.eat().unwrap_or_default();
ellipse_impl(width, height, None, fill, body)
}
@@ -90,7 +90,7 @@ pub fn circle(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
let width = radius.or_else(|| args.named(ctx, "width"));
let height = width.is_none().then(|| args.named(ctx, "height")).flatten();
let fill = args.named(ctx, "fill");
- let body = args.eat(ctx).unwrap_or_default();
+ let body = args.eat().unwrap_or_default();
ellipse_impl(width, height, Some(N64::from(1.0)), fill, body)
}