diff --git a/src/http/client/effects.rs b/src/http/client/effects.rs index bdabdc3..2d24629 100644 --- a/src/http/client/effects.rs +++ b/src/http/client/effects.rs @@ -46,7 +46,7 @@ impl<'a, T: Select> BreathePayload<'a, T> { /// /// ## Example /// ``` -/// use lifxi::http::*; +/// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -82,7 +82,7 @@ impl<'a, T: Select> Breathe<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -101,7 +101,7 @@ impl<'a, T: Select> Breathe<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -120,7 +120,7 @@ impl<'a, T: Select> Breathe<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -139,7 +139,7 @@ impl<'a, T: Select> Breathe<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -158,7 +158,7 @@ impl<'a, T: Select> Breathe<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -177,7 +177,7 @@ impl<'a, T: Select> Breathe<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -271,7 +271,7 @@ impl<'a, T: Select> Pulse<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -290,7 +290,7 @@ impl<'a, T: Select> Pulse<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -309,7 +309,7 @@ impl<'a, T: Select> Pulse<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -328,7 +328,7 @@ impl<'a, T: Select> Pulse<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -347,7 +347,7 @@ impl<'a, T: Select> Pulse<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); diff --git a/src/http/client/mod.rs b/src/http/client/mod.rs index cd0fc97..fe5434c 100644 --- a/src/http/client/mod.rs +++ b/src/http/client/mod.rs @@ -18,6 +18,29 @@ pub use self::effects::*; pub use self::scenes::*; pub use self::states::*; +/// Contains useful utilities for working with the LIFX HTTP API. +/// +/// Use the prelude to maintain the convenience of glob importing without overly polluting the namespace. +/// +/// ## Usage +/// ``` +/// use lifxi::http::prelude::*; +/// ``` +pub mod prelude { + pub use crate::http::Client; + pub use crate::http::Color; + pub use crate::http::ColorParseError; + pub use crate::http::ColorValidationError; + pub use crate::http::Combine; + pub use crate::http::Randomize; + pub use crate::http::Retry; + pub use crate::http::Selector; + pub use crate::http::SelectorParseError; + pub use crate::http::Send; + pub use crate::http::State; + pub use crate::http::StateChange; +} + /// Trait enabling conversion of non-terminal request builders to requests. pub trait AsRequest { /// The HTTP verb to be used. @@ -42,7 +65,7 @@ pub type ClientResult = Result; /// /// ## Example /// ``` -/// use lifxi::http::*; +/// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -64,7 +87,7 @@ impl Client { /// /// ## Examples /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let secret = "foo"; /// let client = Client::new(secret); /// let secret = "foo".to_string(); @@ -98,7 +121,7 @@ impl Client { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let secret = "foo"; /// let client = Client::new(secret); @@ -358,7 +381,7 @@ where /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let lights = client @@ -380,7 +403,7 @@ where /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let lights = client @@ -401,7 +424,7 @@ where /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let lights = client @@ -424,7 +447,7 @@ where /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let lights = client @@ -446,7 +469,7 @@ where /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let lights = client @@ -471,7 +494,7 @@ where /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// fn client() -> Client { /// // TODO: Add lazy-static dependency and use it to make a shared client. /// unimplemented!() @@ -505,7 +528,7 @@ where /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client diff --git a/src/http/client/scenes.rs b/src/http/client/scenes.rs index 0f60f35..98510b6 100644 --- a/src/http/client/scenes.rs +++ b/src/http/client/scenes.rs @@ -18,7 +18,7 @@ impl<'a> Scenes<'a> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let scenes = client @@ -40,7 +40,7 @@ impl<'a> Scenes<'a> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -77,7 +77,7 @@ pub struct ActivatePayload { /// /// ## Example /// ``` -/// use lifxi::http::*; +/// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -110,7 +110,7 @@ impl<'a> Activate<'a> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -130,7 +130,7 @@ impl<'a> Activate<'a> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -150,7 +150,7 @@ impl<'a> Activate<'a> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -168,7 +168,7 @@ impl<'a> Activate<'a> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client diff --git a/src/http/client/states.rs b/src/http/client/states.rs index 0441a87..54bf287 100644 --- a/src/http/client/states.rs +++ b/src/http/client/states.rs @@ -11,7 +11,7 @@ use std::num::NonZeroU8; /// ## Examples /// ### Transition /// ``` -/// use lifxi::http::*; +/// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -23,7 +23,7 @@ use std::num::NonZeroU8; /// ``` /// ### Immediate /// ``` -/// use lifxi::http::*; +/// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -47,7 +47,7 @@ impl<'a, T: Select> Toggle<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -105,7 +105,7 @@ pub struct SetStatePayload { /// /// ## Example /// ``` -/// use lifxi::http::*; +/// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let office = Selector::Label("Office".to_string()); @@ -139,7 +139,7 @@ impl<'a, T: Select> SetState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -157,7 +157,7 @@ impl<'a, T: Select> SetState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -175,7 +175,7 @@ impl<'a, T: Select> SetState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -193,7 +193,7 @@ impl<'a, T: Select> SetState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -211,7 +211,7 @@ impl<'a, T: Select> SetState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -229,7 +229,7 @@ impl<'a, T: Select> SetState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -293,7 +293,7 @@ pub struct SetStatesPayload { /// /// ##Example /// ``` -/// use lifxi::http::*; +/// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let red = State::builder().color(Color::Red); @@ -370,7 +370,7 @@ impl<'a> AsRequest for SetStates<'a> { /// /// ## Example /// ``` -/// use lifxi::http::*; +/// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -404,7 +404,7 @@ impl<'a, T: Select> ChangeState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -423,7 +423,7 @@ impl<'a, T: Select> ChangeState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -442,7 +442,7 @@ impl<'a, T: Select> ChangeState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -461,7 +461,7 @@ impl<'a, T: Select> ChangeState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -480,7 +480,7 @@ impl<'a, T: Select> ChangeState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -498,7 +498,7 @@ impl<'a, T: Select> ChangeState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -516,7 +516,7 @@ impl<'a, T: Select> ChangeState<'a, T> { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// # fn run() { /// let client = Client::new("foo"); /// let result = client @@ -561,7 +561,7 @@ impl<'a, T: Select> AsRequest for ChangeState<'a, T> { /// /// ## Example /// ``` -/// use lifxi::http::*; +/// use lifxi::http::prelude::*; /// fn client() -> Client { /// // TODO: Add lazy-static dependency and use it to make a shared client. /// unimplemented!() diff --git a/src/http/selector.rs b/src/http/selector.rs index 1fa567e..4e2d072 100644 --- a/src/http/selector.rs +++ b/src/http/selector.rs @@ -18,7 +18,7 @@ impl Selectors { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let foo = Selector::Label("foo".to_string()); /// let bar = Selector::Label("bar".to_string()); /// let baz = Selector::Label("baz".to_string()); @@ -117,7 +117,7 @@ pub enum SelectorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let selector = "".parse::(); /// assert_eq!(selector, Err(SelectorParseError::NoLabel)); /// ``` @@ -126,7 +126,7 @@ pub enum SelectorParseError { /// /// ## Examples /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let selector = "id:".parse::(); /// assert_eq!(selector, Err(SelectorParseError::NoValue)); /// let selector = "id".parse::(); @@ -140,7 +140,7 @@ pub enum SelectorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let selector = "foo:1".parse::(); /// assert_eq!(selector, Err(SelectorParseError::UnknownLabel)); /// ``` @@ -384,7 +384,7 @@ where /// /// ## Examples /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let sel = Selector::Group("Living Room".to_string()).random(); /// assert_eq!(&format!("{}", sel), "group:Living Room:random"); /// let sel = Selector::Group("Living Room".to_string()).zoned(1).random(); @@ -401,7 +401,7 @@ pub trait Combine { /// /// ## Examples /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let foo = Selector::Label("foo".to_string()); /// let bar = Selector::Label("bar".to_string()); /// let combined = foo.combine(bar); diff --git a/src/http/state.rs b/src/http/state.rs index a28a643..3fb3fbc 100644 --- a/src/http/state.rs +++ b/src/http/state.rs @@ -123,7 +123,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "hue:".parse::(); /// assert_eq!(color, Err(ColorParseError::NoHue)); /// ``` @@ -132,7 +132,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "hue:j".parse::(); /// assert!(color.is_err()); /// ``` @@ -141,7 +141,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "saturation:".parse::(); /// assert_eq!(color, Err(ColorParseError::NoSaturation)); /// ``` @@ -150,7 +150,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "saturation:j".parse::(); /// assert!(color.is_err()); /// ``` @@ -159,7 +159,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "brightness:".parse::(); /// assert_eq!(color, Err(ColorParseError::NoBrightness)); /// ``` @@ -168,7 +168,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "brightness:j".parse::(); /// assert!(color.is_err()); /// ``` @@ -177,7 +177,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "kelvin:".parse::(); /// assert_eq!(color, Err(ColorParseError::NoKelvin)); /// ``` @@ -186,7 +186,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "kelvin:j".parse::(); /// assert!(color.is_err()); /// ``` @@ -196,7 +196,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "hue:100 rgb:0,0,0".parse::(); /// assert!(color.is_err()); /// ``` @@ -205,7 +205,7 @@ pub enum ColorParseError { /// /// ## /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "hue:100 hue:100".parse::(); /// assert_eq!(color, Err(ColorParseError::MultipleHues)); /// ``` @@ -214,7 +214,7 @@ pub enum ColorParseError { /// /// ## /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "saturation:100 saturation:100".parse::(); /// assert_eq!(color, Err(ColorParseError::MultipleSaturations)); /// ``` @@ -223,7 +223,7 @@ pub enum ColorParseError { /// /// ## /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "brightness:0.4 brightness:0.4".parse::(); /// assert_eq!(color, Err(ColorParseError::MultipleBrightnesses)); /// ``` @@ -232,7 +232,7 @@ pub enum ColorParseError { /// /// ## /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "kelvin:2000 kelvin:2000".parse::(); /// assert_eq!(color, Err(ColorParseError::MultipleKelvins)); /// ``` @@ -241,7 +241,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "rgb:".parse::(); /// assert_eq!(color, Err(ColorParseError::NoRed)); /// ``` @@ -250,7 +250,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "rgb:j".parse::(); /// assert!(color.is_err()); /// ``` @@ -259,7 +259,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "rgb:0,".parse::(); /// assert_eq!(color, Err(ColorParseError::NoGreen)); /// ``` @@ -268,7 +268,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "rgb:0,j".parse::(); /// assert!(color.is_err()); /// ``` @@ -277,7 +277,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "rgb:0,1,".parse::(); /// assert_eq!(color, Err(ColorParseError::NoBlue)); /// ``` @@ -286,7 +286,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "rgb:0,1,j".parse::(); /// assert!(color.is_err()); /// ``` @@ -295,7 +295,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "foo".parse::(); /// assert_eq!(color, Err(ColorParseError::ShortString)); /// ``` @@ -304,7 +304,7 @@ pub enum ColorParseError { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let color = "foobarbaz".parse::(); /// assert_eq!(color, Err(ColorParseError::LongString)); /// ``` @@ -514,7 +514,7 @@ pub enum Error { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::Hue(361).validate(); /// assert_eq!(res, Err(ColorValidationError::Hue(361))); /// ``` @@ -523,7 +523,7 @@ pub enum Error { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::Saturation(1.1).validate(); /// assert_eq!(res, Err(ColorValidationError::SaturationHigh(1.1))); /// ``` @@ -532,7 +532,7 @@ pub enum Error { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::Saturation(-0.1).validate(); /// assert_eq!(res, Err(ColorValidationError::SaturationLow(-0.1))); /// ``` @@ -541,7 +541,7 @@ pub enum Error { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::Brightness(1.1).validate(); /// assert_eq!(res, Err(ColorValidationError::BrightnessHigh(1.1))); /// ``` @@ -550,7 +550,7 @@ pub enum Error { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::Brightness(-0.1).validate(); /// assert_eq!(res, Err(ColorValidationError::BrightnessLow(-0.1))); /// ``` @@ -559,7 +559,7 @@ pub enum Error { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::Kelvin(9001).validate(); /// assert_eq!(res, Err(ColorValidationError::KelvinHigh(9001))); /// ``` @@ -568,7 +568,7 @@ pub enum Error { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::Kelvin(1499).validate(); /// assert_eq!(res, Err(ColorValidationError::KelvinLow(1499))); /// ``` @@ -578,7 +578,7 @@ pub enum Error { /// /// ## Example /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::Hsbk(None, None, None, None).validate(); /// assert_eq!(res, Err(ColorValidationError::HsbkEmpty)); HsbkEmpty, @@ -586,7 +586,7 @@ pub enum Error { /// /// ## Examples /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::RgbStr("12345".to_string()).validate(); /// assert_eq!(res, Err(ColorValidationError::RgbStrShort(false, "12345".to_string()))); /// let res = Color::RgbStr("#12345".to_string()).validate(); @@ -597,7 +597,7 @@ pub enum Error { /// /// ## Examples /// ``` - /// use lifxi::http::*; + /// use lifxi::http::prelude::*; /// let res = Color::RgbStr("1234567".to_string()).validate(); /// assert_eq!(res, Err(ColorValidationError::RgbStrLong(false, "1234567".to_string()))); /// let res = Color::RgbStr("#1234567".to_string()).validate();