Skip to content

Commit

Permalink
Merge pull request #63 from ndarilek/main
Browse files Browse the repository at this point in the history
Add `multi_threaded` feature as passthrough to avoid needing separate egui dependency.
  • Loading branch information
mvlabat authored Jan 29, 2022
2 parents 3ee1bcf + 46c4bf4 commit d9d08a9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
fail-fast: false
matrix:
features: [
'',
'multi_threaded',
'manage_clipboard',
'open_url',
'manage_clipboard,open_url',
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ no-default-features = true # clipboard crate fails the build currently https://g
[features]
default = ["manage_clipboard", "open_url"]
manage_clipboard = ["clipboard", "thread_local"]
multi_threaded = ["egui/multi_threaded"]
open_url = ["webbrowser"]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn main() {

// Note the usage of `ResMut`. Even though `ctx` method doesn't require
// mutability, accessing the context from different threads will result
// into panic if you don't enable `egui/multi_threaded` feature.
// into panic if you don't enable `multi_threaded` feature.
fn ui_example(egui_context: ResMut<EguiContext>) {
egui::Window::new("Hello").show(egui_context.ctx(), |ui| {
ui.label("world");
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
//!
//! // Note the usage of `ResMut`. Even though `ctx` method doesn't require
//! // mutability, accessing the context from different threads will result
//! // into panic if you don't enable `egui/multi_threaded` feature.
//! // into panic if you don't enable `multi_threaded` feature.
//! fn ui_example(egui_context: Res<EguiContext>) {
//! egui::Window::new("Hello").show(egui_context.ctx(), |ui| {
//! ui.label("world");
Expand Down

0 comments on commit d9d08a9

Please sign in to comment.