From f79f24c83e0f4904f2389562105fabcd4349b19a Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 31 Mar 2021 22:53:54 +0200 Subject: [PATCH] Clean up dependencies and features flags --- egui/Cargo.toml | 3 ++- egui_demo_app/Cargo.toml | 2 +- egui_demo_lib/Cargo.toml | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/egui/Cargo.toml b/egui/Cargo.toml index eaa3ac9c..4d092a0f 100644 --- a/egui/Cargo.toml +++ b/egui/Cargo.toml @@ -25,12 +25,13 @@ serde = { version = "1", features = ["derive", "rc"], optional = true } [features] default = ["default_fonts", "single_threaded"] -persistence = ["serde", "epaint/persistence"] # If set, egui will use `include_bytes!` to bundle some fonts. # If you plan on specifying your own fonts you may disable this feature. default_fonts = ["epaint/default_fonts"] +persistence = ["serde", "epaint/persistence"] + # Only needed if you plan to use the same egui::Context from multiple threads. single_threaded = ["epaint/single_threaded"] multi_threaded = ["epaint/multi_threaded"] diff --git a/egui_demo_app/Cargo.toml b/egui_demo_app/Cargo.toml index 762be73a..37b92681 100644 --- a/egui_demo_app/Cargo.toml +++ b/egui_demo_app/Cargo.toml @@ -18,4 +18,4 @@ default = ["persistence", "screen_reader"] http = ["eframe/http", "egui_demo_lib/http"] persistence = ["eframe/persistence", "egui_demo_lib/persistence"] screen_reader = ["eframe/screen_reader"] # experimental -syntect = ["egui_demo_lib/syntect"] +syntax_highlighting = ["egui_demo_lib/syntax_highlighting"] diff --git a/egui_demo_lib/Cargo.toml b/egui_demo_lib/Cargo.toml index 092774e1..e5f52c71 100644 --- a/egui_demo_lib/Cargo.toml +++ b/egui_demo_lib/Cargo.toml @@ -24,8 +24,10 @@ egui = { version = "0.10.0", path = "../egui" } epi = { version = "0.10.0", path = "../epi" } # feature "http": -image = { version = "0.23", default_features = false, features = ["jpeg", "png"], optional = true } -syntect = { version = "4", default_features = false, features = ["default-fancy"], optional = true } # optional syntax highlighting +image = { version = "0.23", default-features = false, features = ["jpeg", "png"], optional = true } + +# feature "syntax_highlighting": +syntect = { version = "4", default-features = false, features = ["default-fancy"], optional = true } # feature "persistence": serde = { version = "1", features = ["derive"], optional = true } @@ -37,6 +39,7 @@ criterion = { version = "0.3", default-features = false } default = [] http = ["image", "epi/http"] persistence = ["epi/persistence", "serde"] +syntax_highlighting = ["syntect"] [[bench]] name = "benchmark"