| 8abea41e | 07-Oct-2025 |
Paolo Bonzini <pbonzini@redhat.com> |
rust: pull error_fatal out of SysbusDeviceMethods::sysbus_realize
Return a Result<()> from the method, and "unwrap" it into error_fatal in the caller.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Si
rust: pull error_fatal out of SysbusDeviceMethods::sysbus_realize
Return a Result<()> from the method, and "unwrap" it into error_fatal in the caller.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 113a7f5b | 19-Sep-2025 |
Paolo Bonzini <pbonzini@redhat.com> |
rust/util: replace Error::err_or_unit/err_or_else with Error::with_errp
Introduce a simpler function that hides the creation of the Error**.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-b
rust/util: replace Error::err_or_unit/err_or_else with Error::with_errp
Introduce a simpler function that hides the creation of the Error**.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 0830ec94 | 10-Oct-2025 |
Paolo Bonzini <pbonzini@redhat.com> |
rust/util: use anyhow's native chaining capabilities
This simplifies conversions, making it possible to convert any error into a QEMU util::Error with ".into()" (and therefore with "?").
The cost i
rust/util: use anyhow's native chaining capabilities
This simplifies conversions, making it possible to convert any error into a QEMU util::Error with ".into()" (and therefore with "?").
The cost is having a separate constructor for when the error is a simple string, but that is made easier by the ensure! macro. If necessary, another macro similar to "anyhow!" can be returned, but for now there is no need for that.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|