anyhow context is nice

This commit is contained in:
galister
2025-12-10 21:03:13 +09:00
parent 7c41a01122
commit c4b8fbd579
8 changed files with 29 additions and 25 deletions

View File

@@ -8,6 +8,7 @@ use std::{
sync::Arc,
};
use anyhow::Context;
use serde::{Deserialize, Serialize};
use wlx_common::{common::LeftRight, config::GeneralConfig, windowing::Positioning};
@@ -187,7 +188,7 @@ impl WayVRConfig {
keyboard_repeat_delay_ms: config_wayvr.keyboard_repeat_delay,
keyboard_repeat_rate: config_wayvr.keyboard_repeat_rate,
blit_method: wayvr::BlitMethod::from_string(&config_wayvr.blit_method)
.ok_or_else(|| anyhow::anyhow!("Unknown blit method"))?,
.context("unknown blit method")?,
auto_hide_delay: if config_wayvr.auto_hide {
Some(config_wayvr.auto_hide_delay)
} else {