ci: install libspeechd-dev and fix new clippy lints (#252)
* ci: install libspeechd-dev * Fix new clippy lints for rust 1.51.0
This commit is contained in:
parent
8e7d4ff4fd
commit
fe92a9826b
3 changed files with 12 additions and 10 deletions
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
|
@ -19,6 +19,7 @@ jobs:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
- run: sudo apt-get install libspeechd-dev
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: check
|
command: check
|
||||||
|
@ -114,6 +115,7 @@ jobs:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
- run: rustup component add clippy
|
- run: rustup component add clippy
|
||||||
|
- run: sudo apt-get install libspeechd-dev
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
|
|
|
@ -619,7 +619,7 @@ impl Visuals {
|
||||||
/// Show small toggle-button for light and dark mode.
|
/// Show small toggle-button for light and dark mode.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn light_dark_small_toggle_button(&self, ui: &mut crate::Ui) -> Option<Self> {
|
pub fn light_dark_small_toggle_button(&self, ui: &mut crate::Ui) -> Option<Self> {
|
||||||
#![allow(clippy::collapsible_if)]
|
#![allow(clippy::collapsible_else_if)]
|
||||||
if self.dark_mode {
|
if self.dark_mode {
|
||||||
if ui
|
if ui
|
||||||
.add(Button::new("☀").frame(false))
|
.add(Button::new("☀").frame(false))
|
||||||
|
|
|
@ -342,20 +342,20 @@ impl Widget for Label {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Into<Label> for &str {
|
impl From<&str> for Label {
|
||||||
fn into(self) -> Label {
|
fn from(s: &str) -> Label {
|
||||||
Label::new(self)
|
Label::new(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Into<Label> for &String {
|
impl From<&String> for Label {
|
||||||
fn into(self) -> Label {
|
fn from(s: &String) -> Label {
|
||||||
Label::new(self)
|
Label::new(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Into<Label> for String {
|
impl From<String> for Label {
|
||||||
fn into(self) -> Label {
|
fn from(s: String) -> Label {
|
||||||
Label::new(self)
|
Label::new(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue