Merge pull request #414 from mahkoh/jorth/clippy
all: address clippy lints
This commit is contained in:
commit
f0caafc862
4 changed files with 4 additions and 4 deletions
|
|
@ -158,7 +158,7 @@ fn write_egl_procs<W: Write>(f: &mut W) -> anyhow::Result<()> {
|
||||||
writeln!(f, " unsafe {{")?;
|
writeln!(f, " unsafe {{")?;
|
||||||
writeln!(
|
writeln!(
|
||||||
f,
|
f,
|
||||||
" ptr::read(&self.{} as *const *mut u8 as *const unsafe extern fn({}) -> {})({})",
|
r#" ptr::read(&self.{} as *const *mut u8 as *const unsafe extern "C" fn({}) -> {})({})"#,
|
||||||
name, args_tys, ret, args_names
|
name, args_tys, ret, args_names
|
||||||
)?;
|
)?;
|
||||||
writeln!(f, " }}")?;
|
writeln!(f, " }}")?;
|
||||||
|
|
|
||||||
|
|
@ -1507,7 +1507,7 @@ impl VulkanRenderer {
|
||||||
};
|
};
|
||||||
match sync {
|
match sync {
|
||||||
AcquireSync::None => {}
|
AcquireSync::None => {}
|
||||||
AcquireSync::Implicit { .. } => {
|
AcquireSync::Implicit => {
|
||||||
zone!("import implicit");
|
zone!("import implicit");
|
||||||
for plane in &buf.template.dmabuf.planes {
|
for plane in &buf.template.dmabuf.planes {
|
||||||
let fd = dma_buf_export_sync_file(&plane.fd, flag)
|
let fd = dma_buf_export_sync_file(&plane.fd, flag)
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ async fn run(n: Rc<ExtIdleNotificationV1>, skip_if_inhibited: bool) {
|
||||||
.client
|
.client
|
||||||
.state
|
.state
|
||||||
.wheel
|
.wheel
|
||||||
.timeout((n.duration_usec - elapsed + 999) / 1000)
|
.timeout((n.duration_usec - elapsed).div_ceil(1000))
|
||||||
.await;
|
.await;
|
||||||
if let Err(e) = res {
|
if let Err(e) = res {
|
||||||
log::error!("Could not wait for idle timeout to elapse: {}", ErrorFmt(e));
|
log::error!("Could not wait for idle timeout to elapse: {}", ErrorFmt(e));
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ pub async fn handle_hardware_cursor_tick(state: Rc<State>) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
loop {
|
loop {
|
||||||
let tick = (cursor.time_until_tick().as_nanos() + 999_999) / 1_000_000;
|
let tick = cursor.time_until_tick().as_nanos().div_ceil(1_000_000);
|
||||||
if tick > 0 {
|
if tick > 0 {
|
||||||
let res = select! {
|
let res = select! {
|
||||||
_ = state.hardware_tick_cursor.non_empty().fuse() => break,
|
_ = state.hardware_tick_cursor.non_empty().fuse() => break,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue