anyhow context is nice
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use anyhow::Context;
|
||||
use glam::FloatExt;
|
||||
use wgui::{
|
||||
animation::{Animation, AnimationEasing},
|
||||
@@ -24,7 +25,7 @@ impl InteractLockHandler {
|
||||
.state
|
||||
.widgets
|
||||
.get_as::<WidgetRectangle>(id)
|
||||
.ok_or_else(|| anyhow::anyhow!("Element with id=\"shadow\" must be a <rectangle>"))?;
|
||||
.context("Element with id=\"shadow\" must be a <rectangle>")?;
|
||||
|
||||
Ok(Self {
|
||||
id,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use anyhow::Context;
|
||||
use glam::{vec3, Affine2, Affine3A, Quat, Vec3};
|
||||
use smallvec::smallvec;
|
||||
use std::{cell::RefCell, collections::HashMap, rc::Rc, sync::Arc};
|
||||
@@ -677,7 +678,7 @@ impl OverlayBackend for WayVRBackend {
|
||||
.data
|
||||
.state
|
||||
.get_render_data(ctx.display)
|
||||
.ok_or_else(|| anyhow::anyhow!("Failed to fetch render data"))?
|
||||
.context("Failed to fetch render data")?
|
||||
.clone();
|
||||
|
||||
drop(wayvr);
|
||||
|
||||
Reference in New Issue
Block a user