From 756085ec4de958ab025cb422835a3b9ef7be267a Mon Sep 17 00:00:00 2001 From: Mauro D Date: Fri, 9 Sep 2022 09:52:51 +0000 Subject: [PATCH] v0.1.0 --- Cargo.toml | 3 +++ examples/websocket.rs | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index f95000f..c488b09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,5 +31,8 @@ websockets = ["tokio", "tokio-tungstenite"] blocking = ["reqwest/blocking"] debug = [] +[lib] +doctest = false + [profile.bench] debug = true diff --git a/examples/websocket.rs b/examples/websocket.rs index c6b1cb9..ddde884 100644 --- a/examples/websocket.rs +++ b/examples/websocket.rs @@ -13,11 +13,15 @@ * except according to those terms. */ +#[cfg(feature = "websockets")] use futures_util::StreamExt; +#[cfg(feature = "websockets")] use jmap_client::{client::Client, client_ws::WebSocketMessage, core::set::SetObject}; +#[cfg(feature = "websockets")] use tokio::sync::mpsc; // Make sure the "websockets" feature is enabled! +#[cfg(feature = "websockets")] async fn websocket() { // Connect to the JMAP server using Basic authentication let client = Client::new() @@ -82,5 +86,6 @@ async fn websocket() { } fn main() { + #[cfg(feature = "websockets")] let _c = websocket(); }