diff --git a/src/lib.rs b/src/lib.rs index 6b5c09c14b74b40fab83188649639e49667b25fe..d01393d31bd315893c0991f7fad0ad848ee22546 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,6 +46,7 @@ mod noasync; pub mod packets; pub mod sshwire; pub mod config; +pub mod prelude; // Application API pub use behaviour::{Behaviour, ServBehaviour, CliBehaviour, diff --git a/src/prelude.rs b/src/prelude.rs new file mode 100644 index 0000000000000000000000000000000000000000..c0fba7aa411d0c0997fd9bc008648806325eb9fd --- /dev/null +++ b/src/prelude.rs @@ -0,0 +1,11 @@ +#![allow(unused_imports)] + +#[cfg(not(feature = "defmt"))] +pub use { + log::{debug, error, info, log, trace, warn}, +}; + +#[cfg(feature = "defmt")] +pub use defmt::{debug, info, warn, panic, error, trace}; + +pub use crate::error::{Error, Result, TrapBug};