Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new clippy lints for rust 1.51.0 #249

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion egui/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ impl Visuals {
/// Show small toggle-button for light and dark mode.
#[must_use]
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 ui
.add(Button::new("☀").frame(false))
Expand Down
18 changes: 9 additions & 9 deletions egui/src/widgets/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,20 +342,20 @@ impl Widget for Label {
}
}

impl Into<Label> for &str {
fn into(self) -> Label {
Label::new(self)
impl From<&str> for Label {
fn from(s: &str) -> Label {
Label::new(s)
}
}

impl Into<Label> for &String {
fn into(self) -> Label {
Label::new(self)
impl From<&String> for Label {
fn from(s: &String) -> Label {
Label::new(s)
}
}

impl Into<Label> for String {
fn into(self) -> Label {
Label::new(self)
impl From<String> for Label {
fn from(s: String) -> Label {
Label::new(s)
}
}