Fix Clippy for Anvil
This commit is contained in:
parent
df9be985ca
commit
217b63f106
|
@ -157,7 +157,7 @@ where
|
||||||
},
|
},
|
||||||
|_surface, states, location| {
|
|_surface, states, location| {
|
||||||
let mut location = *location;
|
let mut location = *location;
|
||||||
if let Some(ref data) = states.data_map.get::<RefCell<SurfaceData>>() {
|
if let Some(data) = states.data_map.get::<RefCell<SurfaceData>>() {
|
||||||
let mut data = data.borrow_mut();
|
let mut data = data.borrow_mut();
|
||||||
let buffer_scale = data.buffer_scale;
|
let buffer_scale = data.buffer_scale;
|
||||||
if let Some(texture) = data
|
if let Some(texture) = data
|
||||||
|
@ -215,8 +215,7 @@ where
|
||||||
initial_place.x -= output_rect.loc.x;
|
initial_place.x -= output_rect.loc.x;
|
||||||
if let Some(wl_surface) = toplevel_surface.get_surface() {
|
if let Some(wl_surface) = toplevel_surface.get_surface() {
|
||||||
// this surface is a root of a subsurface tree that needs to be drawn
|
// this surface is a root of a subsurface tree that needs to be drawn
|
||||||
if let Err(err) =
|
if let Err(err) = draw_surface_tree(renderer, frame, wl_surface, initial_place, output_scale, log)
|
||||||
draw_surface_tree(renderer, frame, &wl_surface, initial_place, output_scale, log)
|
|
||||||
{
|
{
|
||||||
result = Err(err);
|
result = Err(err);
|
||||||
}
|
}
|
||||||
|
@ -225,12 +224,12 @@ where
|
||||||
.geometry(toplevel_surface)
|
.geometry(toplevel_surface)
|
||||||
.map(|g| g.loc)
|
.map(|g| g.loc)
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
window_map.with_child_popups(&wl_surface, |popup| {
|
window_map.with_child_popups(wl_surface, |popup| {
|
||||||
let location = popup.location();
|
let location = popup.location();
|
||||||
let draw_location = initial_place + location + toplevel_geometry_offset;
|
let draw_location = initial_place + location + toplevel_geometry_offset;
|
||||||
if let Some(wl_surface) = popup.get_surface() {
|
if let Some(wl_surface) = popup.get_surface() {
|
||||||
if let Err(err) =
|
if let Err(err) =
|
||||||
draw_surface_tree(renderer, frame, &wl_surface, draw_location, output_scale, log)
|
draw_surface_tree(renderer, frame, wl_surface, draw_location, output_scale, log)
|
||||||
{
|
{
|
||||||
result = Err(err);
|
result = Err(err);
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,7 +301,7 @@ fn fullscreen_output_geometry(
|
||||||
// First test if a specific output has been requested
|
// First test if a specific output has been requested
|
||||||
// if the requested output is not found ignore the request
|
// if the requested output is not found ignore the request
|
||||||
if let Some(wl_output) = wl_output {
|
if let Some(wl_output) = wl_output {
|
||||||
return output_map.find_by_output(&wl_output).map(|o| o.geometry());
|
return output_map.find_by_output(wl_output).map(|o| o.geometry());
|
||||||
}
|
}
|
||||||
|
|
||||||
// There is no output preference, try to find the output
|
// There is no output preference, try to find the output
|
||||||
|
|
|
@ -630,7 +630,7 @@ impl AnvilState<UdevData> {
|
||||||
let mut surfaces_iter = surfaces.iter();
|
let mut surfaces_iter = surfaces.iter();
|
||||||
let mut option_iter = crtc
|
let mut option_iter = crtc
|
||||||
.iter()
|
.iter()
|
||||||
.flat_map(|crtc| surfaces.get(&crtc).map(|surface| (crtc, surface)));
|
.flat_map(|crtc| surfaces.get(crtc).map(|surface| (crtc, surface)));
|
||||||
|
|
||||||
let to_render_iter: &mut dyn Iterator<Item = (&crtc::Handle, &Rc<RefCell<SurfaceData>>)> =
|
let to_render_iter: &mut dyn Iterator<Item = (&crtc::Handle, &Rc<RefCell<SurfaceData>>)> =
|
||||||
if crtc.is_some() {
|
if crtc.is_some() {
|
||||||
|
|
Loading…
Reference in New Issue