Set toolchain to stable

This commit is contained in:
Luke D. Jones
2023-07-03 20:07:33 +12:00
parent 6cfa09a02b
commit 5c159d2294
4 changed files with 12 additions and 15 deletions

View File

@@ -23,7 +23,10 @@
use zbus::dbus_proxy; use zbus::dbus_proxy;
#[dbus_proxy(interface = "org.asuslinux.Daemon")] #[dbus_proxy(
interface = "org.asuslinux.Daemon",
default_path = "/org/asuslinux/Anime"
)]
trait Daemon { trait Daemon {
/// InsertAsusGif method /// InsertAsusGif method
fn insert_asus_gif( fn insert_asus_gif(

View File

@@ -99,17 +99,14 @@ impl From<Colour> for [u8; 3] {
#[typeshare] #[typeshare]
#[cfg_attr(feature = "dbus", derive(Type), zvariant(signature = "s"))] #[cfg_attr(feature = "dbus", derive(Type), zvariant(signature = "s"))]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)] #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)]
pub enum Speed { pub enum Speed {
Low = 0xe1, Low = 0xe1,
#[default]
Med = 0xeb, Med = 0xeb,
High = 0xf5, High = 0xf5,
} }
impl Default for Speed {
fn default() -> Self {
Speed::Med
}
}
impl FromStr for Speed { impl FromStr for Speed {
type Err = Error; type Err = Error;
@@ -138,18 +135,15 @@ impl From<Speed> for u8 {
/// Enum corresponds to the required integer value /// Enum corresponds to the required integer value
#[typeshare] #[typeshare]
#[cfg_attr(feature = "dbus", derive(Type), zvariant(signature = "s"))] #[cfg_attr(feature = "dbus", derive(Type), zvariant(signature = "s"))]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)] #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)]
pub enum Direction { pub enum Direction {
#[default]
Right, Right,
Left, Left,
Up, Up,
Down, Down,
} }
impl Default for Direction {
fn default() -> Self {
Direction::Right
}
}
impl FromStr for Direction { impl FromStr for Direction {
type Err = Error; type Err = Error;

View File

@@ -5,5 +5,5 @@
# to the user in the error, instead of "error: invalid channel name '[toolchain]'". # to the user in the error, instead of "error: invalid channel name '[toolchain]'".
[toolchain] [toolchain]
channel = "1.65.0" channel = "stable"
components = [ "rustfmt", "clippy" ] components = [ "rustfmt", "clippy" ]

View File

@@ -155,7 +155,7 @@ fn main() -> Result<(), Box<dyn Error>> {
} }
} }
for (x_count, b) in dev.buffer[start..=end].iter().enumerate() { for (x_count, b) in dev.buffer[start..=end].iter().enumerate() {
canvas.set_draw_color(Color::RGB(*b as u8, *b as u8, *b as u8)); canvas.set_draw_color(Color::RGB(*b, *b, *b));
let x: i32 = w + x_count as i32 * w let x: i32 = w + x_count as i32 * w
- if (y_count + y_offset as usize) % 2 != 0 { - if (y_count + y_offset as usize) % 2 != 0 {