From 55524a69e2b2edeabd9f87849f99d3dc6999cbc1 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 12 Oct 2024 19:49:45 +0200 Subject: [PATCH] fix doctest, enable all features for docs.rs --- crates/servicepoint/src/command.rs | 4 ++-- crates/servicepoint/src/connection.rs | 2 +- crates/servicepoint_binding_c/Cargo.toml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/servicepoint/src/command.rs b/crates/servicepoint/src/command.rs index 49c230d..abe983c 100644 --- a/crates/servicepoint/src/command.rs +++ b/crates/servicepoint/src/command.rs @@ -89,8 +89,8 @@ pub enum Command { /// # use servicepoint::{Command, Connection, Origin}; /// # let connection = Connection::Fake; /// use servicepoint::{CharGrid, Cp437Grid}; - /// let grid = CharGrid::from(&"Hello,\nWorld!"); - /// let grid = Cp437Grid::from(grid); + /// let grid = CharGrid::from("Hello,\nWorld!"); + /// let grid = Cp437Grid::from(&grid); /// connection.send(Command::Cp437Data(Origin::ZERO, grid)).expect("send failed"); /// ``` /// diff --git a/crates/servicepoint/src/connection.rs b/crates/servicepoint/src/connection.rs index c12f341..5d4e902 100644 --- a/crates/servicepoint/src/connection.rs +++ b/crates/servicepoint/src/connection.rs @@ -90,7 +90,7 @@ impl Connection { /// /// # Examples /// - /// ```rust + /// ```no_run /// use tungstenite::http::Uri; /// use servicepoint::{Command, Connection}; /// let uri = "ws://localhost:8080".parse().unwrap(); diff --git a/crates/servicepoint_binding_c/Cargo.toml b/crates/servicepoint_binding_c/Cargo.toml index 5a3c37d..96633a6 100644 --- a/crates/servicepoint_binding_c/Cargo.toml +++ b/crates/servicepoint_binding_c/Cargo.toml @@ -23,3 +23,6 @@ features = ["all_compressions"] [lints] workspace = true + +[package.metadata.docs.rs] +all-features = true