From 66c5877166292b5b35fec16c56ba8451e4667833 Mon Sep 17 00:00:00 2001 From: Paul Kernfeld Date: Sat, 25 Apr 2020 19:20:29 -0400 Subject: [PATCH] Make `cargo test` pass w/o `amethyst` feature I did this by gating the test code behind a feature flag --- src/lib.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ceaccdc..89a38b4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -215,9 +215,13 @@ //! arguments like so: //! //! ``` -//! use amethyst_core::Transform; -//! use specs_physics::systems::SyncBodiesToPhysicsSystem; -//! SyncBodiesToPhysicsSystem::::default(); +//! // This code will only compile if the amethyst feature is enabled +//! #[cfg(amethyst)] +//! { +//! use amethyst_core::Transform; +//! use specs_physics::systems::SyncBodiesToPhysicsSystem; +//! SyncBodiesToPhysicsSystem::::default(); +//! } //! ``` //! //! Alternatively to building your own `Dispatcher`, you can always fall back on