summaryrefslogtreecommitdiffstats
path: root/svgbob/src/buffer/fragment_buffer/fragment/rect.rs
diff options
context:
space:
mode:
authorJovansonlee Cesar <ivanceras@gmail.com>2021-09-09 02:16:54 +0800
committerJovansonlee Cesar <ivanceras@gmail.com>2021-09-09 02:16:54 +0800
commita0989292b9501af673b3d6148f055e5d7f3fb8c5 (patch)
tree12728fc16381b34bd496224a1025bb9feb1c57b3 /svgbob/src/buffer/fragment_buffer/fragment/rect.rs
parentafe9168fda6d43911fd3bdb3de785776d2402e30 (diff)
Improve code readability on view by using arrays instead of vec
Diffstat (limited to 'svgbob/src/buffer/fragment_buffer/fragment/rect.rs')
-rw-r--r--svgbob/src/buffer/fragment_buffer/fragment/rect.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/svgbob/src/buffer/fragment_buffer/fragment/rect.rs b/svgbob/src/buffer/fragment_buffer/fragment/rect.rs
index 7210c4a..2942991 100644
--- a/svgbob/src/buffer/fragment_buffer/fragment/rect.rs
+++ b/svgbob/src/buffer/fragment_buffer/fragment/rect.rs
@@ -150,7 +150,7 @@ impl Into<ConvexPolygon> for Rect {
impl<MSG> Into<Node<MSG>> for Rect {
fn into(self) -> Node<MSG> {
rect(
- vec![
+ [
x(self.start.x),
y(self.start.y),
width(self.width()),
@@ -167,7 +167,7 @@ impl<MSG> Into<Node<MSG>> for Rect {
rx(0)
},
],
- vec![],
+ [],
)
}
}