Skip to content

Commit dc1b53b

Browse files
KeavonTrueDoctor
andcommitted
Upgrade Graphite to Rust 2021 edition; upgrade dependencies (#387)
* Upgrade Graphite to Rust 2021 edition; upgrade dependencies * Fix CI * Move changes to the project Cargo.tomls * Remove unnecessary 2021 edition upgrade tweak * Show version number before and after updating rustc Co-authored-by: Dennis Kobert <[email protected]> # Conflicts: # Cargo.lock
1 parent 51a9674 commit dc1b53b

File tree

8 files changed

+70
-71
lines changed

8 files changed

+70
-71
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
- name: 🚧 Install Node dependencies
2626
run: cd frontend && npm install
2727

28+
- name: 🔼 Update Rust to latest stable
29+
run: rustc --version && rustup update stable && rustc --version
30+
2831
- name: 📦 Install cargo-about
2932
run: cargo install cargo-about
3033

Cargo.lock

Lines changed: 56 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charcoal/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[package]
22
name = "graphite-charcoal"
33
version = "0.1.0"
4+
rust-version = "1.56.0"
45
authors = ["Graphite Authors <[email protected]>"]
5-
edition = "2018"
6+
edition = "2021"
67
readme = "../README.md"
78
homepage = "https://www.graphite.design"
89
repository = "https://github.com/GraphiteEditor/Graphite"

editor/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[package]
22
name = "graphite-editor"
33
version = "0.1.0"
4+
rust-version = "1.56.0"
45
authors = ["Graphite Authors <[email protected]>"]
5-
edition = "2018"
6+
edition = "2021"
67
readme = "../README.md"
78
homepage = "https://www.graphite.design"
89
repository = "https://github.com/GraphiteEditor/Graphite"

editor/src/document/document_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ impl MessageHandler<DocumentMessage, &InputPreprocessor> for DocumentMessageHand
637637
let scrollbar_size = viewport_size / bounds_length;
638638

639639
let log = root_layerdata.scale.log2();
640-
let mut ruler_inverval = if log < 0. { 100. * 2_f64.powf(-log.ceil()) } else { 100. / 2_f64.powf(log.ceil()) };
640+
let ruler_inverval = if log < 0. { 100. * 2_f64.powf(-log.ceil()) } else { 100. / 2_f64.powf(log.ceil()) };
641641
let ruler_spacing = ruler_inverval * root_layerdata.scale;
642642

643643
let ruler_origin = self.graphene_document.root.transform.transform_point2(DVec2::ZERO);

frontend/wasm/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[package]
22
name = "graphite-wasm"
33
version = "0.1.0"
4+
rust-version = "1.56.0"
45
authors = ["Graphite Authors <[email protected]>"]
5-
edition = "2018"
6+
edition = "2021"
67
readme = "../../README.md"
78
homepage = "https://www.graphite.design"
89
repository = "https://github.com/GraphiteEditor/Graphite"
@@ -19,9 +20,6 @@ log = "0.4"
1920
serde = { version = "1.0", features = ["derive"] }
2021
wasm-bindgen = { version = "0.2.73", features = ["serde-serialize"] }
2122

22-
[profile.dev]
23-
opt-level = 3
24-
2523
[dev-dependencies]
2624
wasm-bindgen-test = "0.3.22"
2725

graphene/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[package]
22
name = "graphite-graphene"
33
version = "0.1.0"
4+
rust-version = "1.56.0"
45
authors = ["Graphite Authors <[email protected]>"]
5-
edition = "2018"
6+
edition = "2021"
67
readme = "../README.md"
78
homepage = "https://www.graphite.design"
89
repository = "https://github.com/GraphiteEditor/Graphite"

proc-macros/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[package]
22
name = "graphite-proc-macros"
33
version = "0.1.0"
4+
rust-version = "1.56.0"
45
authors = ["Graphite Authors <[email protected]>"]
5-
edition = "2018"
6+
edition = "2021"
67
readme = "../README.md"
78
homepage = "https://www.graphite.design"
89
repository = "https://github.com/GraphiteEditor/Graphite"

0 commit comments

Comments
 (0)