mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tpm: remove mixture of str and Path
`impl AsRef<Path>` is the most idiomatic way to consume paths in Rust. I removed the mixture. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
c53781bf5f
commit
afcb2b285f
@@ -2491,7 +2491,7 @@ impl DeviceManager {
|
||||
tpm_path: &Path,
|
||||
) -> DeviceManagerResult<Arc<Mutex<devices::tpm::Tpm>>> {
|
||||
// Create TPM Device
|
||||
let tpm = devices::tpm::Tpm::new(tpm_path.to_str().unwrap()).map_err(|e| {
|
||||
let tpm = devices::tpm::Tpm::new(tpm_path).map_err(|e| {
|
||||
DeviceManagerError::CreateTpmDevice(anyhow!("Failed to create TPM Device : {e:?}"))
|
||||
})?;
|
||||
let tpm = Arc::new(Mutex::new(tpm));
|
||||
|
||||
Reference in New Issue
Block a user