diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..435ed75 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +target = "wasm32-unknown-unknown" \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 669c3ec..c02ff8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,17 +2,18 @@ name = "plotters-canvas" version = "0.3.1" authors = ["Hao Hou "] -edition = "2018" +edition = "2021" license = "MIT" description = "Plotters HTML5 Canvas Backend" homepage = "https://plotters-rs.github.io" repository = "https://github.com/plotters-rs/plotters-canvas" readme = "README.md" +resolver = "2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies.plotters-backend] -git = "https://github.com/plotters-rs/plotters" +version = "0.3" [dependencies] js-sys= "0.3.32" @@ -27,4 +28,4 @@ wasm-bindgen-test = "^0.3.17" [dev-dependencies.plotters] default_features = false -git = "https://github.com/plotters-rs/plotters" +version = "0.3" diff --git a/src/canvas.rs b/src/canvas.rs index d1c9dca..932422e 100644 --- a/src/canvas.rs +++ b/src/canvas.rs @@ -556,19 +556,19 @@ mod test { // not horizontal nor vertical assert_eq!( ((10.0, 10.0), (20.0, 20.0)), - fine_hor_ver_lines((10.0, 10.0), (20.0, 20.0)) + fine_hor_ver_lines((10, 10), (20, 20)) ); // vertical assert_eq!( ((9.5, 10.0), (19.5, 10.0)), - fine_hor_ver_lines((10.0, 10.0), (20.0, 10.0)) + fine_hor_ver_lines((10, 10), (20, 10)) ); // horizontal assert_eq!( ((10.0, 9.5), (10.0, 19.5)), - fine_hor_ver_lines((10.0, 10.0), (10.0, 20.0)) + fine_hor_ver_lines((10, 10), (10, 20)) ); } }