diff --git a/crates/servicepoint/README.md b/crates/servicepoint/README.md index 9d7064b..dec2997 100644 --- a/crates/servicepoint/README.md +++ b/crates/servicepoint/README.md @@ -18,7 +18,7 @@ fn main() { .expect("connection failed"); // clear screen content - connection.send(servicepoint::Command::Clear.into()) + connection.send(servicepoint::Command::Clear) .expect("send failed"); } ``` diff --git a/crates/servicepoint/src/lib.rs b/crates/servicepoint/src/lib.rs index 5b3bcea..7263a6c 100644 --- a/crates/servicepoint/src/lib.rs +++ b/crates/servicepoint/src/lib.rs @@ -42,3 +42,8 @@ pub const PIXEL_COUNT: usize = PIXEL_WIDTH * PIXEL_HEIGHT; /// Actual hardware limit is around 28-29ms/frame. Rounded up for less dropped packets. pub const FRAME_PACING: Duration = Duration::from_millis(30); + +// include README.md in doctest +#[doc = include_str!("../README.md")] +#[cfg(doctest)] +pub struct ReadmeDocTests;