File tree Expand file tree Collapse file tree 6 files changed +28
-7
lines changed
Expand file tree Collapse file tree 6 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ check :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - uses : dtolnay/rust-toolchain@stable
15+ - uses : Swatinem/rust-cache@v2
16+ # needed or else: `The system library `alsa` required by crate `alsa-sys` was not found.`
17+ - run : sudo apt-get update && sudo apt-get install -y libasound2-dev
18+ - run : ./ci.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -euo pipefail
3+
4+ cargo fmt --all --check
5+ cargo clippy --all-targets --all-features -- -D warnings
6+ cargo test --all
7+ cargo doc --no-deps
Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ impl std::iter::Sum for Color {
282282#[ cfg( feature = "embedded-graphics" ) ]
283283impl From < Color > for embedded_graphics:: pixelcolor:: Rgb888 {
284284 fn from ( color : Color ) -> Self {
285- let ( r, g, b) = color. quantize ( 256 ) ;
285+ let ( r, g, b) = color. quantize ( 255 ) ;
286286 Self :: new ( r, g, b)
287287 }
288288}
Original file line number Diff line number Diff line change @@ -73,9 +73,7 @@ pub struct DeviceCanvas<Spec: DeviceSpec> {
7373}
7474
7575impl < Spec : DeviceSpec > DeviceCanvas < Spec > {
76- /// Create a new canvas by guessing both input and output MIDI connection by their name. If you
77- /// need precise control over the specific MIDI connections that will be used, use
78- /// [`DeviceCanvas::from_ports`] instead // TODO: not implemented yet
76+ /// Create a new canvas by guessing both input and output MIDI connection by their name.
7977 pub fn guess (
8078 mut callback : impl FnMut ( CanvasMessage ) + Send + ' static ,
8179 ) -> Result < Self , crate :: MidiError > {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ macro_rules! impl_traits_for_canvas {
3737 prelude:: * ,
3838 draw_target:: DrawTarget ,
3939 geometry:: Dimensions ,
40- pixelcolor:: { Rgb888 , RgbColor } ,
40+ pixelcolor:: Rgb888 ,
4141 primitives:: rectangle:: Rectangle ,
4242 } ;
4343 }
Original file line number Diff line number Diff line change @@ -107,8 +107,6 @@ impl Pad {
107107 }
108108
109109 /// If this pad is outside the bounding rectangle, wrap it around
110- ///
111- /// Note: if you want more fine-grained edges, use [`Canvas::wrap_edges`] instead
112110 pub fn wrap_edges ( self , width : u32 , height : u32 ) -> Pad {
113111 Pad {
114112 x : self . x . rem_euclid ( width as i32 ) ,
You can’t perform that action at this time.
0 commit comments