Clippy fixes
This commit is contained in:
parent
053bc98faa
commit
da5c814555
|
@ -56,21 +56,18 @@ impl Kind {
|
||||||
|
|
||||||
/// Activate/Deactivate this window
|
/// Activate/Deactivate this window
|
||||||
pub fn set_activated(&self, active: bool) {
|
pub fn set_activated(&self, active: bool) {
|
||||||
match *self {
|
if let Kind::Xdg(ref t) = self {
|
||||||
Kind::Xdg(ref t) => {
|
let changed = t.with_pending_state(|state| {
|
||||||
let changed = t.with_pending_state(|state| {
|
if active {
|
||||||
if active {
|
state.states.set(xdg_toplevel::State::Activated)
|
||||||
state.states.set(xdg_toplevel::State::Activated)
|
} else {
|
||||||
} else {
|
state.states.unset(xdg_toplevel::State::Activated)
|
||||||
state.states.unset(xdg_toplevel::State::Activated)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if let Ok(true) = changed {
|
|
||||||
t.send_configure();
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
if let Ok(true) = changed {
|
||||||
|
t.send_configure();
|
||||||
}
|
}
|
||||||
_ => {}
|
}
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -752,6 +752,7 @@ impl<A: AsRawFd + 'static> AtomicDrmSurface<A> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a mode is set a matching blob needs to be set (the inverse is not true)
|
// If a mode is set a matching blob needs to be set (the inverse is not true)
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn build_request<'a>(
|
pub fn build_request<'a>(
|
||||||
&self,
|
&self,
|
||||||
new_connectors: &mut dyn Iterator<Item = &connector::Handle>,
|
new_connectors: &mut dyn Iterator<Item = &connector::Handle>,
|
||||||
|
|
|
@ -313,7 +313,7 @@ where
|
||||||
|
|
||||||
let maybe_buffer = slot.userdata().as_ref().map(|(buf, _)| buf.clone());
|
let maybe_buffer = slot.userdata().as_ref().map(|(buf, _)| buf.clone());
|
||||||
let dmabuf = match maybe_buffer {
|
let dmabuf = match maybe_buffer {
|
||||||
Some(buf) => buf.clone(),
|
Some(buf) => buf,
|
||||||
None => {
|
None => {
|
||||||
let dmabuf = slot.export()?;
|
let dmabuf = slot.export()?;
|
||||||
let fb_handle = attach_framebuffer(&self.drm, &*slot)?;
|
let fb_handle = attach_framebuffer(&self.drm, &*slot)?;
|
||||||
|
|
|
@ -70,6 +70,10 @@ impl ::std::error::Error for EglExtensionNotSupportedError {}
|
||||||
/// Returns the address of an OpenGL function.
|
/// Returns the address of an OpenGL function.
|
||||||
///
|
///
|
||||||
/// Result is independent of displays and does not guarantee an extension is actually supported at runtime.
|
/// Result is independent of displays and does not guarantee an extension is actually supported at runtime.
|
||||||
|
///
|
||||||
|
/// # Safety
|
||||||
|
///
|
||||||
|
/// This function should only be invoked while an EGL context is active.
|
||||||
pub unsafe fn get_proc_address(symbol: &str) -> *const c_void {
|
pub unsafe fn get_proc_address(symbol: &str) -> *const c_void {
|
||||||
let addr = CString::new(symbol.as_bytes()).unwrap();
|
let addr = CString::new(symbol.as_bytes()).unwrap();
|
||||||
let addr = addr.as_ptr();
|
let addr = addr.as_ptr();
|
||||||
|
|
Loading…
Reference in New Issue