cleanup: fmt + clippy
This commit is contained in:
parent
ace619fd01
commit
a698efe935
3 changed files with 6 additions and 6 deletions
|
|
@ -116,7 +116,7 @@ fn main() {
|
|||
smithay_clipboard::dnd::DndEvent::Offer(id, OfferEvent::Enter { mime_types, .. }) => {
|
||||
println!("Received DnD Enter for {id:?}");
|
||||
state.offer_hover_id = id;
|
||||
if let Some(mime) = mime_types.get(0) {
|
||||
if let Some(mime) = mime_types.first() {
|
||||
if let Ok(data) = state
|
||||
.clipboard
|
||||
.peek_offer::<smithay_clipboard::text::Text>(Some(mime.clone()))
|
||||
|
|
@ -589,7 +589,7 @@ impl SimpleWindow {
|
|||
};
|
||||
|
||||
// Draw to the window:
|
||||
canvas.chunks_exact_mut(4).enumerate().for_each(|(_, chunk)| {
|
||||
canvas.chunks_exact_mut(4).for_each(|chunk| {
|
||||
// ARGB color.
|
||||
let color = 0xFF181818u32;
|
||||
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ where
|
|||
|
||||
if let (Some((wl_buffer, width, height)), Some(surface)) = (buffer, icon_surface) {
|
||||
surface.damage_buffer(0, 0, width as i32, height as i32);
|
||||
surface.attach(Some(&wl_buffer), 0, 0);
|
||||
surface.attach(Some(wl_buffer), 0, 0);
|
||||
surface.commit();
|
||||
|
||||
dbg!("attached buffer, damaged surface.");
|
||||
|
|
|
|||
|
|
@ -99,9 +99,9 @@ impl<T: 'static + Clone> State<T> {
|
|||
}
|
||||
|
||||
let compositor_state =
|
||||
CompositorState::bind(&globals, &queue_handle).expect("wl_compositor not available");
|
||||
let output_state = OutputState::new(&globals, &queue_handle);
|
||||
let shm = Shm::bind(&globals, &queue_handle).expect("wl_shm not available");
|
||||
CompositorState::bind(globals, queue_handle).expect("wl_compositor not available");
|
||||
let output_state = OutputState::new(globals, queue_handle);
|
||||
let shm = Shm::bind(globals, queue_handle).expect("wl_shm not available");
|
||||
|
||||
let seat_state = SeatState::new(globals, queue_handle);
|
||||
for seat in seat_state.seats() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue