diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-08-30 22:18:55 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-08-30 22:18:55 +0200 |
| commit | 181f756a9e8f7b664101058fe91e36b3858c2d02 (patch) | |
| tree | 542e7c694e91d8cc91fa97a328e9bda0567db679 /src/length.rs | |
| parent | 0d44cf532136f3ba8e34d6f967f9e844cfb9c3f0 (diff) | |
Format everything with rustfmt! 💚
Diffstat (limited to 'src/length.rs')
| -rw-r--r-- | src/length.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/length.rs b/src/length.rs index 5634da19..fb62763e 100644 --- a/src/length.rs +++ b/src/length.rs @@ -150,7 +150,7 @@ impl FromStr for Length { // have valid ASCII chars as subbytes. let split = len - 2; let bytes = src.as_bytes(); - let unit = match &bytes[split..] { + let unit = match &bytes[split ..] { b"pt" => Unit::Pt, b"mm" => Unit::Mm, b"cm" => Unit::Cm, @@ -158,7 +158,7 @@ impl FromStr for Length { _ => return Err(ParseLengthError), }; - src[..split] + src[.. split] .parse::<f64>() .map(|val| Self::new(val, unit)) .map_err(|_| ParseLengthError) |
