1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
extern crate hcid;
extern crate lib3h_crypto_api;
extern crate lib3h_protocol;
extern crate native_tls;
extern crate tungstenite;
extern crate url_serde;
#[macro_use]
extern crate lazy_static;
#[cfg(test)]
#[macro_use]
extern crate unwrap_to;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate rmp_serde;
#[macro_use]
extern crate log;
pub mod dht;
pub mod engine;
pub mod error;
pub mod gateway;
pub mod time;
pub mod transport;
pub mod transport_wss;
#[cfg(test)]
pub mod tests {
pub fn enable_logging_for_test(enable: bool) {
std::thread::sleep(std::time::Duration::from_millis(10));
if std::env::var("RUST_LOG").is_err() {
std::env::set_var("RUST_LOG", "debug");
}
let _ = env_logger::builder()
.default_format_timestamp(false)
.default_format_module_path(false)
.is_test(enable)
.try_init();
}
}