Skip to content

Commit

Permalink
fixup! Organized features for http
Browse files Browse the repository at this point in the history
  • Loading branch information
rorynugent committed Aug 20, 2024
1 parent 28a2257 commit d00ebdf
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/udp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rtempest::{data::EventType, udp::Tempest};
use rtempest::{udp::data::EventType, udp::Tempest};

#[tokio::main]
async fn main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/udp_subscribe.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rtempest::{data::EventType, udp::Tempest};
use rtempest::{udp::data::EventType, udp::Tempest};

#[tokio::main]
async fn main() {
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

#[cfg(feature = "udp")]
pub mod udp;
pub mod data;
pub mod mock;
pub mod test_common;

#[cfg(feature = "http")]
pub mod http;
10 changes: 7 additions & 3 deletions src/udp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
//! Primary interface for WeatherFlow Tempest weather data over UDP

use crate::data::*;
pub mod data;
pub mod mock;
pub mod test_common;

use crate::udp::data::*;
use log::trace;
use serde_json::{Error, Value};
use std::net::Ipv4Addr;
Expand Down Expand Up @@ -824,8 +828,8 @@ impl Tempest {
#[cfg(test)]
mod test {
use super::*;
use crate::mock::MockSender;
use crate::test_common::*;
use crate::udp::mock::MockSender;
use crate::udp::test_common::*;

async fn test_setup(caching: bool) -> (MockSender, Tempest, Receiver<EventType>, u16) {
let mock = MockSender::bind();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/integration_udp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rtempest::mock::MockSender;
use rtempest::test_common::*;
use rtempest::{data::EventType, udp::Tempest};
use rtempest::udp::mock::MockSender;
use rtempest::udp::test_common::*;
use rtempest::{udp::data::EventType, udp::Tempest};

const PORT: u16 = 50222;

Expand Down

0 comments on commit d00ebdf

Please sign in to comment.