Files
@ 1b7b852c3395
Branch filter:
Location: CSY/reowolf/src/test/mod.rs - annotation
1b7b852c3395
685 B
application/rls-services+xml
Add testdata
06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 06f259bf8031 | use core::fmt::Debug;
mod connector;
mod setup;
struct Panicked(Box<dyn std::any::Any>);
impl Debug for Panicked {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if let Some(str_slice) = self.0.downcast_ref::<&'static str>() {
f.pad(str_slice)
} else if let Some(string) = self.0.downcast_ref::<String>() {
f.pad(string)
} else {
f.pad("Box<Any>")
}
}
}
fn handle(result: Result<(), std::boxed::Box<(dyn std::any::Any + std::marker::Send + 'static)>>) {
match result {
Ok(_) => {}
Err(x) => {
panic!("Worker panicked: {:?}", Panicked(x));
}
}
}
|