[PR Feedback] Use cfg_attr to consolidate compilation conditions
//! [1]:https://github.com/nats-io/nats-streaming-server
mod error;
-
-#[cfg(feature = "nitox_stream")]
-#[path = "event/nitox.rs"]
-mod stream_impl;
-
-// This is the default, but setting it as a default in Cargo.toml
+// ratsio_stream is the default, but setting it as a default in Cargo.toml
// makes it trickier to use nitox instead.
-#[cfg(any(feature = "ratsio_stream", not(feature = "nitox_stream")))]
-#[path = "event/ratsio.rs"]
+#[cfg_attr(feature = "nitox_stream", path = "event/nitox.rs")]
+#[cfg_attr(any(feature = "ratsio_stream", not(feature = "nitox_stream")),
+ path = "event/ratsio.rs")]
mod stream_impl;
mod types;
