@@ -50,9 +50,7 @@ pub enum ConfigurationError {
50
50
/// Cannot load kernel due to invalid memory configuration or invalid kernel image: {0}
51
51
KernelLoader ( #[ from] linux_loader:: loader:: Error ) ,
52
52
/// Error creating vcpu configuration: {0}
53
- VcpuConfig ( CpuConfigurationError ) ,
54
- /// Error applying vcpu template: {0}
55
- VcpuApplyTemplate ( CpuConfigurationError ) ,
53
+ VcpuConfig ( #[ from] CpuConfigurationError ) ,
56
54
/// Error configuring the vcpu: {0}
57
55
VcpuConfigure ( KvmVcpuError ) ,
58
56
}
@@ -80,12 +78,10 @@ pub fn configure_system_for_boot(
80
78
boot_cmdline : Cmdline ,
81
79
) -> Result < ( ) , ConfigurationError > {
82
80
// Construct the base CpuConfiguration to apply CPU template onto.
83
- let cpu_config =
84
- CpuConfiguration :: new ( cpu_template, vcpus) . map_err ( ConfigurationError :: VcpuConfig ) ?;
81
+ let cpu_config = CpuConfiguration :: new ( cpu_template, vcpus) ?;
85
82
86
83
// Apply CPU template to the base CpuConfiguration.
87
- let cpu_config = CpuConfiguration :: apply_template ( cpu_config, cpu_template)
88
- . map_err ( ConfigurationError :: VcpuApplyTemplate ) ?;
84
+ let cpu_config = CpuConfiguration :: apply_template ( cpu_config, cpu_template) ;
89
85
90
86
let vcpu_config = VcpuConfig {
91
87
vcpu_count : machine_config. vcpu_count ,
0 commit comments