diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-11-15 16:59:49 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-11-15 17:06:43 +0100 |
| commit | 63c274e7f6aa3a8c3f43abb91935ec924a186f73 (patch) | |
| tree | 193777ff773c6b547c6ef828ddf9750694fae7bc /src/library/grid.rs | |
| parent | 8a38899c98b4f9829b2d1f21c8fee66d254d20c6 (diff) | |
Make clippy happier and remove `Str`
Diffstat (limited to 'src/library/grid.rs')
| -rw-r--r-- | src/library/grid.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/library/grid.rs b/src/library/grid.rs index af486496..c7e6b8e9 100644 --- a/src/library/grid.rs +++ b/src/library/grid.rs @@ -3,7 +3,8 @@ use super::prelude::*; /// `grid`: Arrange children into a grid. pub fn grid(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { castable! { - Vec<TrackSizing>: "integer or (auto, linear, fractional, or array thereof)", + Vec<TrackSizing>, + Expected: "integer or (auto, linear, fractional, or array thereof)", Value::Auto => vec![TrackSizing::Auto], Value::Length(v) => vec![TrackSizing::Linear(v.into())], Value::Relative(v) => vec![TrackSizing::Linear(v.into())], @@ -17,7 +18,8 @@ pub fn grid(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { } castable! { - TrackSizing: "auto, linear, or fractional", + TrackSizing, + Expected: "auto, linear, or fractional", Value::Auto => Self::Auto, Value::Length(v) => Self::Linear(v.into()), Value::Relative(v) => Self::Linear(v.into()), @@ -43,10 +45,7 @@ pub fn grid(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { GridNode { tracks: tracks.clone(), gutter: gutter.clone(), - children: children - .iter() - .map(|child| child.to_stack(&style).pack()) - .collect(), + children: children.iter().map(|child| child.to_stack(style).pack()).collect(), } }))) } |
