(sandbox: &Sandbox)
| 94 | |
| 95 | impl VmSandboxDriverConfig { |
| 96 | fn from_sandbox(sandbox: &Sandbox) -> Result<Self, String> { |
| 97 | let Some(template) = sandbox |
| 98 | .spec |
| 99 | .as_ref() |
| 100 | .and_then(|spec| spec.template.as_ref()) |
| 101 | else { |
| 102 | return Ok(Self::default()); |
| 103 | }; |
| 104 | |
| 105 | Self::from_template(template) |
| 106 | } |
| 107 | |
| 108 | fn from_template(template: &SandboxTemplate) -> Result<Self, String> { |
| 109 | let Some(config) = template.driver_config.as_ref() else { |
nothing calls this directly
no outgoing calls
no test coverage detected