As of Rust 1.26, match ergonomics allows you to write: impl Bar { fn borrow(&mut self) -> Result<&Box<Foo>, BarErr> { match &self.data { Some(e) => Ok(e), ...
確定! 回上一頁