Skip to content

Commit

Permalink
fix: Apply cargo clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danyspin97 committed Nov 15, 2024
1 parent 7865433 commit e134ef6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion daemon/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl SerializedWallpaperInfo {
// If there is no sorting but the group is set
let sorting = if group.is_some() && sorting.is_none() {
// Assign it the default one, so that we can do the group match below
Some(Sorting::default().into())
Some(Sorting::default())
} else {
sorting
};
Expand Down
17 changes: 6 additions & 11 deletions daemon/src/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,11 @@ impl Surface {
wl_output: WlOutput,
info: DisplayInfo,
wallpaper_info: WallpaperInfo,
egl_display: egl::Display,
qh: &QueueHandle<Wpaperd>,
xdg_state_home: PathBuf,
) -> Self {
let wl_surface = wl_layer.wl_surface().clone();
let egl_context = EglContext::new(egl_display, &wl_surface);
let egl_context = EglContext::new(wpaperd.egl_display, &wl_surface);
// Make the egl context as current to make the renderer creation work
egl_context
.make_current()
Expand Down Expand Up @@ -263,15 +262,11 @@ impl Surface {
self.image_picker.update_current_image(image_path, index);
self.renderer.start_transition(transition_time);
// Update the instant where we have drawn the image
match self.event_source {
EventSource::Running(registration_token, duration, _) => {
self.event_source = EventSource::Running(
registration_token,
duration,
Instant::now(),
);
}
_ => {}
if let EventSource::Running(registration_token, duration, _) =
self.event_source
{
self.event_source =
EventSource::Running(registration_token, duration, Instant::now());
}
}
// Restart the counter
Expand Down
3 changes: 1 addition & 2 deletions daemon/src/wpaperd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct Wpaperd {
pub registry_state: RegistryState,
pub surfaces: Vec<Surface>,
pub config: Config,
egl_display: egl::Display,
pub egl_display: egl::Display,
pub filelist_cache: Rc<RefCell<FilelistCache>>,
pub image_loader: Rc<RefCell<ImageLoader>>,
pub wallpaper_groups: Rc<RefCell<WallpaperGroups>>,
Expand Down Expand Up @@ -261,7 +261,6 @@ impl OutputHandler for Wpaperd {
output,
display_info,
wallpaper_info,
self.egl_display,
qh,
xdg_state_home_dir,
));
Expand Down

0 comments on commit e134ef6

Please sign in to comment.