Apply strict linting to release builds #75

Merged
savanni merged 21 commits from clippy-linting into main 2023-10-05 17:01:49 +00:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 37c60e4346 - Show all commits

View File

@ -45,7 +45,7 @@ impl ApplicationWindow {
]
.into_iter()
.map(|name| {
let playlist = PlaylistCard::new();
let playlist = PlaylistCard::default();
playlist.set_name(name);
playlist
})

View File

@ -31,8 +31,8 @@ glib::wrapper! {
pub struct PlaylistCard(ObjectSubclass<PlaylistCardPrivate>) @extends gtk::Box, gtk::Widget, @implements gtk::Orientable;
}
impl PlaylistCard {
pub fn new() -> Self {
impl Default for PlaylistCard {
fn default() -> Self {
let s: Self = Object::builder().build();
s.set_orientation(gtk::Orientation::Vertical);
s.add_css_class("playlist-card");
@ -43,7 +43,9 @@ impl PlaylistCard {
s
}
}
impl PlaylistCard {
pub fn set_name(&self, s: &str) {
self.imp().name.set_text(s);
}