clippy
This commit is contained in:
@@ -479,7 +479,7 @@ fn handle_scroll<O>(hit: &PointerHit, hovered: &mut OverlayWindowData<O>, app: &
|
||||
hovered
|
||||
.config
|
||||
.backend
|
||||
.on_scroll(app, &hit, scroll_y, scroll_x);
|
||||
.on_scroll(app, hit, scroll_y, scroll_x);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -511,11 +511,10 @@ where
|
||||
id,
|
||||
&overlay_state.transform,
|
||||
overlay_state.curvature.as_ref(),
|
||||
) {
|
||||
if hit.dist.is_finite() {
|
||||
)
|
||||
&& hit.dist.is_finite() {
|
||||
hits.push(hit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hits.sort_by(|a, b| a.dist.total_cmp(&b.dist));
|
||||
@@ -657,7 +656,7 @@ fn ray_test(
|
||||
let (dist, local_pos) = curvature.map_or_else(
|
||||
|| {
|
||||
Some(raycast_plane(
|
||||
&ray_origin,
|
||||
ray_origin,
|
||||
Vec3A::NEG_Z,
|
||||
overlay_pose,
|
||||
Vec3A::NEG_Z,
|
||||
|
||||
@@ -354,7 +354,7 @@ pub fn set_action_manifest(input: &mut InputManager) -> anyhow::Result<()> {
|
||||
}
|
||||
|
||||
if let Err(e) = input.set_action_manifest(action_path.as_path()) {
|
||||
bail!("Failed to set action manifest: {}", e);
|
||||
bail!("Failed to set action manifest: {e}");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::backend::input::{HoverResult, PointerHit};
|
||||
use crate::graphics::CommandBuffers;
|
||||
use crate::state::AppState;
|
||||
use crate::windowing::backend::{FrameMeta, OverlayBackend, ShouldRender};
|
||||
use crate::windowing::window::{OverlayWindowConfig, OverlayWindowData, OverlayWindowState};
|
||||
use crate::windowing::window::{OverlayWindowConfig, OverlayWindowData};
|
||||
use crate::windowing::Z_ORDER_LINES;
|
||||
|
||||
use super::overlay::OpenVrOverlayData;
|
||||
@@ -85,9 +85,7 @@ impl LinePool {
|
||||
},
|
||||
..OverlayWindowData::from_config(OverlayWindowConfig {
|
||||
name: Arc::from(format!("wlx-line{id}")),
|
||||
default_state: OverlayWindowState {
|
||||
..Default::default()
|
||||
},
|
||||
default_state: Default::default(),
|
||||
z_order: Z_ORDER_LINES,
|
||||
..OverlayWindowConfig::from_backend(Box::new(LineBackend {
|
||||
view: self.view.clone(),
|
||||
|
||||
@@ -53,14 +53,12 @@ pub(super) fn install_manifest(app_mgr: &mut ApplicationsManager) -> anyhow::Res
|
||||
};
|
||||
|
||||
let Ok(mut file) = File::create(&manifest_path) else {
|
||||
bail!("Failed to create manifest file at {:?}", manifest_path);
|
||||
bail!("Failed to create manifest file at {manifest_path:?}");
|
||||
};
|
||||
|
||||
if let Err(e) = manifest.write(&mut file) {
|
||||
bail!(
|
||||
"Failed to write manifest file at {:?}: {:?}",
|
||||
manifest_path,
|
||||
e
|
||||
"Failed to write manifest file at {manifest_path:?}: {e:?}"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,8 +88,7 @@ impl OverlayWindowData<OpenVrOverlayData> {
|
||||
.config
|
||||
.active_state
|
||||
.as_ref()
|
||||
.map(|x| x.alpha > 0.05)
|
||||
.unwrap_or(false);
|
||||
.is_some_and(|x| x.alpha > 0.05);
|
||||
|
||||
if want_visible && !self.data.visible {
|
||||
self.show_internal(overlay, app)?;
|
||||
|
||||
@@ -125,8 +125,7 @@ impl OverlayWindowData<OpenXrOverlayData> {
|
||||
.config
|
||||
.active_state
|
||||
.as_ref()
|
||||
.map(|x| x.alpha > 0.05)
|
||||
.unwrap_or(false);
|
||||
.is_some_and(|x| x.alpha > 0.05);
|
||||
|
||||
if self.data.last_visible != want_visible {
|
||||
if want_visible {
|
||||
|
||||
@@ -576,9 +576,7 @@ impl Display {
|
||||
Ok(child) => Ok(SpawnProcessResult { auth_key, child }),
|
||||
Err(e) => {
|
||||
anyhow::bail!(
|
||||
"Failed to launch process with path \"{}\": {}. Make sure your exec path exists.",
|
||||
exec_path,
|
||||
e
|
||||
"Failed to launch process with path \"{exec_path}\": {e}. Make sure your exec path exists."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ fn load_egl_func(
|
||||
) -> anyhow::Result<extern "system" fn()> {
|
||||
let raw_fn = egl
|
||||
.get_proc_address(func_name)
|
||||
.ok_or_else(|| anyhow::anyhow!("Required EGL function {} not found", func_name))?;
|
||||
.ok_or_else(|| anyhow::anyhow!("Required EGL function {func_name} not found"))?;
|
||||
Ok(raw_fn)
|
||||
}
|
||||
|
||||
|
||||
@@ -619,7 +619,7 @@ impl WayVRServer {
|
||||
.nonblocking(local_socket::ListenerNonblockingMode::Both);
|
||||
let listener = match opts.create_sync() {
|
||||
Ok(listener) => listener,
|
||||
Err(e) => anyhow::bail!("Failed to start WayVRServer IPC listener. Reason: {}", e),
|
||||
Err(e) => anyhow::bail!("Failed to start WayVRServer IPC listener. Reason: {e}"),
|
||||
};
|
||||
|
||||
log::info!("WayVRServer IPC running at {printname}");
|
||||
|
||||
Reference in New Issue
Block a user