3 type TranslateFn = Box<dyn Fn(String, String) -> String>;
5 pub struct DeviceCluster {
10 pub async fn do_something(&mut self) -> Result<String, Box<dyn std::error::Error>> {
11 let mut last_error: Box<dyn std::error::Error>;
13 for device in &mut self.devices {
14 match device.do_something().await {
23 //~^ ERROR used binding `last_error` isn't initialized
28 translate_fn: Option<TranslateFn>,
32 pub async fn do_something(&mut self) -> Result<String, Box<dyn std::error::Error>> {