From daaa31a2762408eea964cd6333eaf533a5c486d0 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Tue, 28 May 2024 20:28:20 +0200 Subject: [PATCH] add crate doc to examples --- Cargo.toml | 2 ++ crates/servicepoint/examples/announce.rs | 2 ++ crates/servicepoint/examples/game_of_life.rs | 2 ++ crates/servicepoint/examples/moving_line.rs | 2 ++ crates/servicepoint/examples/random_brightness.rs | 3 +++ crates/servicepoint/examples/wiping_clear.rs | 1 + 6 files changed, 12 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 017c224..658ce9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,4 +12,6 @@ version = "0.5.0" [workspace.lints.rust] missing-docs = "warn" + +[workspace.lints.clippy] missing-docs-in-crate-items = "warn" diff --git a/crates/servicepoint/examples/announce.rs b/crates/servicepoint/examples/announce.rs index 31d19d2..b165135 100644 --- a/crates/servicepoint/examples/announce.rs +++ b/crates/servicepoint/examples/announce.rs @@ -1,3 +1,5 @@ +//! An example for how to send text to the display. + use clap::Parser; use servicepoint::{ByteGrid, Command, Connection, Grid, Origin}; diff --git a/crates/servicepoint/examples/game_of_life.rs b/crates/servicepoint/examples/game_of_life.rs index aef929e..9fff62e 100644 --- a/crates/servicepoint/examples/game_of_life.rs +++ b/crates/servicepoint/examples/game_of_life.rs @@ -1,3 +1,5 @@ +//! A simple game of life implementation to show how to render graphics to the display. + use std::thread; use clap::Parser; diff --git a/crates/servicepoint/examples/moving_line.rs b/crates/servicepoint/examples/moving_line.rs index 2037146..f0353be 100644 --- a/crates/servicepoint/examples/moving_line.rs +++ b/crates/servicepoint/examples/moving_line.rs @@ -1,3 +1,5 @@ +//! A simple example for how to send pixel data to the display. + use std::thread; use clap::Parser; diff --git a/crates/servicepoint/examples/random_brightness.rs b/crates/servicepoint/examples/random_brightness.rs index 7e3c4e8..d9ea583 100644 --- a/crates/servicepoint/examples/random_brightness.rs +++ b/crates/servicepoint/examples/random_brightness.rs @@ -1,3 +1,6 @@ +//! A simple example for how to set brightnesses for tiles on the screen. +//! Continuously changes the tiles in a random window to random brightnesses. + use std::time::Duration; use clap::Parser; diff --git a/crates/servicepoint/examples/wiping_clear.rs b/crates/servicepoint/examples/wiping_clear.rs index 3f255d8..1295fc4 100644 --- a/crates/servicepoint/examples/wiping_clear.rs +++ b/crates/servicepoint/examples/wiping_clear.rs @@ -1,3 +1,4 @@ +//! An example on how to modify the image on screen without knowing the current content. use std::thread; use std::time::Duration;