Skip to content

Commit

Permalink
fix: Feature-gated doc tests working properly
Browse files Browse the repository at this point in the history
Found via cargo-hack.

Fix from https://stackoverflow.com/a/50314936/11477374
  • Loading branch information
alexpovel committed Oct 24, 2023
1 parent 33097c1 commit a46e60d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
//! Another example, using multiple actions and no scoping, is:
//!
//! ```rust
//! # #[cfg(feature = "symbols")] {
//! use srgn::scoping::view::ScopedViewBuilder;
//!
//! let input = "Assume π <= 4 < α -> β, ∀ x ∈ ℝ";
Expand All @@ -114,6 +115,7 @@
//!
//! // Existing Unicode was uppercased properly, "ASCII symbols" were replaced.
//! assert_eq!(view.to_string(), "ASSUME Π ≤ 4 < Α → Β, ∀ X ∈ ℝ");
//! # }
//! ```
//!
//! ## Applying an action (passing)
Expand All @@ -123,6 +125,7 @@
//! the [`Default`].
//!
//! ```rust
//! # #[cfg(feature = "german")] {
//! use srgn::scoping::view::ScopedViewBuilder;
//! use srgn::actions::German;
//!
Expand All @@ -133,6 +136,7 @@
//! view.map(&action);
//!
//! assert_eq!(view.to_string(), "Der Überflieger-Käfer! 🛩️");
//! # }
//! ```
#![warn(clippy::all)]
Expand Down

0 comments on commit a46e60d

Please sign in to comment.