mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
be03426408
Avoiding Box<dyn Error> makes it less likely that we display errors with insufficient context by accident. Many of the errors touched in this CL already had helpful message written! But those corresponding enum variants were never being instantiated, and that bug was masked by Box<dyn Error>. For example see the Error::LoadCmdline and Error::LoadKernel. pub enum Error { LoadCmdline(kernel_loader::Error), ... } Before this CL: // Bug: boxes the underlying error without adding LoadCmdline kernel_loader::load_cmdline(...)?; After this CL: kernel_loader::load_cmdline(...).map_err(Error::LoadCmdline)?; TEST=cargo check TEST=cargo check --all-features TEST=cargo check --target aarch64-unknown-linux-gnu Change-Id: I7c0cff843c2211565226b9dfb4142ad6b7fa15ac Reviewed-on: https://chromium-review.googlesource.com/1502112 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |