Skip to content

Commit 165f5f6

Browse files
Fredrik Simonssonepilys
authored andcommitted
Update after code review. Use to_string in map_err
Signed-off-by: Fredrik Simonsson <[email protected]>
1 parent e87fe89 commit 165f5f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vhost-device-scmi/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,19 @@ fn start_backend(config: VuScmiConfig) -> Result<()> {
101101
backend.clone(),
102102
GuestMemoryAtomic::new(GuestMemoryMmap::new()),
103103
)
104-
.map_err(|e| format!("{e}"))?;
104+
.map_err(|e| e.to_string())?;
105105

106106
// Register devices such as "/dev/iio:deviceX" which can actively notify the frontend to epoll the handler.
107107
// Then once there is data coming from these devices, an event will be created. (device_event=3)
108108
let handlers = daemon.get_epoll_handlers();
109109
backend
110110
.read()
111-
.map_err(|e| format!("{e}"))?
111+
.map_err(|e| e.to_string())?
112112
.register_device_event_fd(handlers);
113113

114114
daemon
115115
.serve(&config.socket_path)
116-
.map_err(|e| format!("{e}"))?;
116+
.map_err(|e| e.to_string())?;
117117
debug!("Finishing backend");
118118
}
119119
}

0 commit comments

Comments
 (0)