This repository has been archived on 2026-08-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
donglora/vendor/anyhow/src/nightly.rs
T
swaitsandClaude Opus 4.6 3102fc747a feat: add display UI with splash screen, dashboard, and RSSI sparkline
Implement full SSD1306 OLED display support:
- Splash screen on boot (1.5s) with project name, version, board
- Dashboard showing radio state, config, counters, RSSI/SNR
- RSSI history sparkline (64-sample ring buffer, 2px-wide bars)
- DisplayOn/DisplayOff host commands routed via dedicated channel
- Pure render functions against generic DrawTarget (no hardware coupling)
- Display on/off control bypasses radio task entirely

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:42:54 -06:00

59 lines
1.5 KiB
Rust

// This code exercises the surface area that we expect of the Error generic
// member access API. If the current toolchain is able to compile it, then
// anyhow is able to provide backtrace support.
#![cfg_attr(anyhow_build_probe, feature(error_generic_member_access))]
use core::error::{self, Error};
use std::backtrace::Backtrace;
pub use core::error::Request;
#[cfg(anyhow_build_probe)]
const _: () = {
use core::fmt::{self, Debug, Display};
struct MyError(Backtrace);
impl Debug for MyError {
fn fmt(&self, _formatter: &mut fmt::Formatter) -> fmt::Result {
unimplemented!()
}
}
impl Display for MyError {
fn fmt(&self, _formatter: &mut fmt::Formatter) -> fmt::Result {
unimplemented!()
}
}
impl Error for MyError {
fn provide<'a>(&'a self, request: &mut Request<'a>) {
provide_ref_backtrace(request, &self.0);
}
}
};
// Include in sccache cache key.
#[cfg(anyhow_build_probe)]
const _: Option<&str> = option_env!("RUSTC_BOOTSTRAP");
pub fn request_ref_backtrace(err: &dyn Error) -> Option<&Backtrace> {
request_ref::<Backtrace>(err)
}
fn request_ref<'a, T>(err: &'a (impl Error + ?Sized)) -> Option<&'a T>
where
T: 'static + ?Sized,
{
error::request_ref::<T>(err)
}
pub fn provide_ref_backtrace<'a>(request: &mut Request<'a>, backtrace: &'a Backtrace) {
Request::provide_ref(request, backtrace);
}
pub fn provide<'a>(err: &'a (impl Error + ?Sized), request: &mut Request<'a>) {
Error::provide(err, request);
}