Skip to content

Commit

Permalink
Make document-features "Optional"
Browse files Browse the repository at this point in the history
  • Loading branch information
lampsitter committed Sep 5, 2023
1 parent 683f72c commit e8ed242
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ image = { version = "0.24", default-features = false, features = ["png"] }
parking_lot = "0.12"
poll-promise = "0.3"
pulldown-cmark = { version = "0.9.3", default-features = false }
# pulled in as a required dependency by poll-promise, so this crate might as well
# do the same
document-features = "0.2"


syntect = { version = "5.0.0", optional = true, default-features = false, features = [
Expand All @@ -33,6 +30,8 @@ usvg = { version = "0.35.0", optional = true }
url = { version = "2.4", optional = true }
ehttp = { version = "0.3.0", optional = true }

document-features = { version = "0.2", optional = true }

[features]
## Syntax highlighting for code blocks
syntax_highlighting = ["syntect"]
Expand All @@ -47,4 +46,5 @@ fetch = ["ehttp", "url", "image/jpeg"]
eframe = { git = "https://github.com/emilk/egui", rev = "2c7c598" }

[package.metadata.docs.rs]
features = ["syntax_highlighting", "svg"]
# docs.rs build can fail with the fetch feature enabled
features = ["syntax_highlighting", "svg", "document-features"]
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! ```
//!
//! # Features
#![doc = document_features::document_features!()]
#![cfg_attr(feature = "document-features", doc = document_features::document_features!())]

mod fetch_data;
mod image_loading;
Expand Down

0 comments on commit e8ed242

Please sign in to comment.