From 47d4a07469c218ccea751e271d9a12d76908c496 Mon Sep 17 00:00:00 2001 From: Grant Miller Date: Mon, 10 May 2021 18:07:30 -0500 Subject: [PATCH] Move `mod graphics` to top and delete `extern crate` --- src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 01bf549..04117e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,5 @@ #![no_std] -#[cfg(feature = "graphics")] -extern crate embedded_graphics; - use embedded_hal::blocking::delay::DelayMs; use embedded_hal::digital::v2::OutputPin; @@ -10,6 +7,9 @@ use core::iter::once; use display_interface::DataFormat::{U16BEIter, U8Iter}; use display_interface::WriteOnlyDataCommand; +#[cfg(feature = "graphics")] +mod graphics; + pub use embedded_hal::spi::MODE_0 as SPI_MODE; pub use display_interface::DisplayError; @@ -307,9 +307,6 @@ impl Scroller { } } -#[cfg(feature = "graphics")] -mod graphics; - #[derive(Clone, Copy)] enum Command { SoftwareReset = 0x01,