diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-10-25 13:34:49 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-10-25 13:38:32 +0200 |
| commit | 3968181622694c4a15ae336049439b328649bca0 (patch) | |
| tree | 979093e93b49bfde47e54bc4475cedf24d12e3d8 /src/library/elements.rs | |
| parent | adf52a873f0cdff310c236998fc5018a886b339b (diff) | |
Replace `..` syntax with `range` function
Diffstat (limited to 'src/library/elements.rs')
| -rw-r--r-- | src/library/elements.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/elements.rs b/src/library/elements.rs index 5d87d65d..cd8a6f88 100644 --- a/src/library/elements.rs +++ b/src/library/elements.rs @@ -30,7 +30,7 @@ pub fn rect(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { let width = args.named("width")?; let height = args.named("height")?; let fill = args.named("fill")?; - let body = args.eat(); + let body = args.find(); Ok(shape_impl(ShapeKind::Rect, width, height, fill, body)) } @@ -46,7 +46,7 @@ pub fn square(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { size => size, }; let fill = args.named("fill")?; - let body = args.eat(); + let body = args.find(); Ok(shape_impl(ShapeKind::Square, width, height, fill, body)) } @@ -55,7 +55,7 @@ pub fn ellipse(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { let width = args.named("width")?; let height = args.named("height")?; let fill = args.named("fill")?; - let body = args.eat(); + let body = args.find(); Ok(shape_impl(ShapeKind::Ellipse, width, height, fill, body)) } @@ -71,7 +71,7 @@ pub fn circle(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { diameter => diameter, }; let fill = args.named("fill")?; - let body = args.eat(); + let body = args.find(); Ok(shape_impl(ShapeKind::Circle, width, height, fill, body)) } |
