Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
feat!: expose Event directly, hide event module
Browse files Browse the repository at this point in the history
BREAKING CHANGE: use `use sn_routing::Event;` instead of `use sn_routing::event::Event;`.
  • Loading branch information
madadam committed Nov 9, 2020
1 parent 56e658f commit d940b77
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/minimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
use futures::future::join_all;
use hex_fmt::HexFmt;
use log::{info, LevelFilter};
use sn_routing::{event::Event, Config, EventStream, Routing, TransportConfig};
use sn_routing::{Config, Event, EventStream, Routing, TransportConfig};
use std::{
collections::HashSet,
convert::TryInto,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,14 @@ extern crate log;
// ############################################################################
pub use self::{
error::{Error, Result},
event::Event,
location::{DstLocation, SrcLocation},
routing::{Config, EventStream, Routing},
section::{SectionProofChain, MIN_AGE},
};
pub use qp2p::Config as TransportConfig;

pub use xor_name::{Prefix, XorName, XOR_NAME_LEN}; // TODO remove pub on API update
/// sn_routing events.
pub mod event;

// ############################################################################
// Private
Expand All @@ -90,6 +89,7 @@ mod consensus;
mod crypto;
mod delivery_group;
mod error;
mod event;
mod location;
mod message_filter;
mod messages;
Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod utils;
use anyhow::{Error, Result};
use ed25519_dalek::Keypair;
use futures::future;
use sn_routing::{event::Event, EventStream, ELDER_SIZE};
use sn_routing::{Event, EventStream, ELDER_SIZE};
use tokio::time;
use utils::*;

Expand Down
2 changes: 1 addition & 1 deletion tests/drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod utils;
use self::utils::*;
use anyhow::{format_err, Result};
use bytes::Bytes;
use sn_routing::{event::Event, DstLocation, SrcLocation};
use sn_routing::{DstLocation, Event, SrcLocation};
use tokio::time;

#[tokio::test]
Expand Down
2 changes: 1 addition & 1 deletion tests/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod utils;
use anyhow::{format_err, Result};
use bytes::Bytes;
use qp2p::QuicP2p;
use sn_routing::{event::Event, DstLocation, Error, SrcLocation, TransportConfig};
use sn_routing::{DstLocation, Error, Event, SrcLocation, TransportConfig};
use std::net::{IpAddr, Ipv4Addr};
use utils::*;

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use anyhow::{bail, format_err, Error, Result};
use ed25519_dalek::Keypair;
use futures::future;
use itertools::Itertools;
use sn_routing::{event::Event, Config, EventStream, Routing, TransportConfig, MIN_AGE};
use sn_routing::{Config, Event, EventStream, Routing, TransportConfig, MIN_AGE};
use std::{
collections::{BTreeSet, HashSet},
io::Write,
Expand Down

0 comments on commit d940b77

Please sign in to comment.