aboutsummaryrefslogtreecommitdiffstats
path: root/zone_core/src
diff options
context:
space:
mode:
Diffstat (limited to 'zone_core/src')
-rw-r--r--zone_core/src/lib.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/zone_core/src/lib.rs b/zone_core/src/lib.rs
index 25fe33a..6801ee8 100644
--- a/zone_core/src/lib.rs
+++ b/zone_core/src/lib.rs
@@ -76,7 +76,7 @@ impl<'r> Responder<'r, 'static> for Container {
}
impl TryFrom<FileSystem> for Container {
- type Error = zone_zfs::Error;
+ type Error = zone_zfs::error::Error;
fn try_from(file_system: FileSystem) -> Result<Self, Self::Error> {
let path_buf = PathBuf::from(&file_system)
@@ -116,11 +116,13 @@ impl TryFrom<zone_nspawn::Container> for Container {
type Error = zone_nspawn::Error;
fn try_from(value: zone_nspawn::Container) -> Result<Self, Self::Error> {
- // id, template, user
- let v: Vec<&str> = value.machine.split("-").collect();
+ // id, template, user
+ let v: Vec<&str> = value.machine.split('-').collect();
Ok(Container {
- id: v[0].parse().map_err(|err| Self::Error::Parsing(format!("Failed to parse container id: {:?}", err)))?,
+ id: v[0].parse().map_err(|err| {
+ Self::Error::Parsing(format!("Failed to parse container id: {:?}", err))
+ })?,
template: v[1].to_owned(),
user: v[2].to_owned(),
status: ContainerStatus::Running,