From 3fa84ec4800309bf166d3b81bbfdd97d4882d456 Mon Sep 17 00:00:00 2001 From: Sameer Puri Date: Thu, 2 Sep 2021 15:20:23 -0400 Subject: [PATCH] track svgtypes v0.6 --- Cargo.lock | 12 ++++++------ lib/Cargo.toml | 2 +- lib/src/converter.rs | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 51ea5e3..b8db32c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,9 +201,9 @@ dependencies = [ [[package]] name = "float-cmp" -version = "0.5.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75224bec9bfe1a65e2d34132933f2de7fe79900c96a0174307554244ece8150e" +checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" [[package]] name = "fnv" @@ -566,9 +566,9 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.2.3" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" +checksum = "533494a8f9b724d33625ab53c6c4800f7cc445895924a8ef649222dcb76e938b" [[package]] name = "slab" @@ -684,9 +684,9 @@ dependencies = [ [[package]] name = "svgtypes" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c536faaff1a10837cfe373142583f6e27d81e96beba339147e77b67c9f260ff" +checksum = "8199d1b4aa7d4aa9dc39665c6edcbaacc8deeab2811638b9127c7f956736fa8b" dependencies = [ "float-cmp", "siphasher", diff --git a/lib/Cargo.toml b/lib/Cargo.toml index f7cf6f7..de0a67a 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -14,7 +14,7 @@ euclid = "0.22" log = "0" uom = "0.31.1" roxmltree = "0" -svgtypes = "0" +svgtypes = "0.6" paste = "1" [dev-dependencies] diff --git a/lib/src/converter.rs b/lib/src/converter.rs index 534d14e..9d4e1ae 100644 --- a/lib/src/converter.rs +++ b/lib/src/converter.rs @@ -298,18 +298,18 @@ fn length_to_mm(l: svgtypes::Length, dpi: f64) -> f64 { let dpi_scaling = dpi / 96.0; let length = match l.unit { - Cm => Length::new::(l.num), - Mm => Length::new::(l.num), - In => Length::new::(l.num), - Pc => Length::new::(l.num) / dpi_scaling, - Pt => Length::new::(l.num) / dpi_scaling, - Px => Length::new::(l.num / dpi_scaling), + Cm => Length::new::(l.number), + Mm => Length::new::(l.number), + In => Length::new::(l.number), + Pc => Length::new::(l.number) / dpi_scaling, + Pt => Length::new::(l.number) / dpi_scaling, + Px => Length::new::(l.number / dpi_scaling), other => { warn!( "Converting from '{:?}' to millimeters is not supported, treating as millimeters", other ); - Length::new::(l.num) + Length::new::(l.number) } };