Closed aatifsyed closed 2 years ago
Allows the user to early return errors with ?, like
?
fn main() -> Result<(), Box<dyn Error>> { let opt = Opt::from_args(); let i2c_bus = I2cdev::new(opt.i2c_bus_path)?; // here let mut sensor = BME280::new(i2c_bus, opt.i2c_address, Delay); sensor.init()?; // here let measurements = sensor.measure()?; //here println!("{:?}", measurements); Ok(()) }
I understand it has been 14 months but any chance you could rebase this on master? :)
:(
Thanks for implementing!
Allows the user to early return errors with
?
, like