Fix tomorrow lmao
This commit is contained in:
parent
488712b71c
commit
c6976db04c
@ -1,2 +0,0 @@
|
|||||||
[target.'cfg(all())']
|
|
||||||
runner = "./.cargo/runner.sh"
|
|
@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cd ../rte && exec "$@"
|
|
@ -61,6 +61,6 @@ size_z = 64
|
|||||||
.read_to_string(&mut config_data)
|
.read_to_string(&mut config_data)
|
||||||
.expect("Failed to read config file");
|
.expect("Failed to read config file");
|
||||||
|
|
||||||
Ok(toml::from_str(&config_data).expect("Failed to deserialize config.toml"))
|
Ok(toml::from_str(&config_data)?)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ pub enum AppError {
|
|||||||
TryFromIntError(TryFromIntError),
|
TryFromIntError(TryFromIntError),
|
||||||
RhaiError(Box<EvalAltResult>),
|
RhaiError(Box<EvalAltResult>),
|
||||||
MutexPoisoned(String),
|
MutexPoisoned(String),
|
||||||
|
DeserializerError(toml::de::Error),
|
||||||
InvalidWorldFile,
|
InvalidWorldFile,
|
||||||
// InvalidExtensionVersion,
|
// InvalidExtensionVersion,
|
||||||
}
|
}
|
||||||
@ -27,6 +28,7 @@ impl fmt::Display for AppError {
|
|||||||
AppError::TryFromIntError(err) => write!(f, "Integer conversion error: {}", err),
|
AppError::TryFromIntError(err) => write!(f, "Integer conversion error: {}", err),
|
||||||
AppError::RhaiError(err) => write!(f, "Rhai compilation error: {}", err),
|
AppError::RhaiError(err) => write!(f, "Rhai compilation error: {}", err),
|
||||||
AppError::MutexPoisoned(err) => write!(f, "Poisoned mutex: {}", err),
|
AppError::MutexPoisoned(err) => write!(f, "Poisoned mutex: {}", err),
|
||||||
|
AppError::DeserializerError(err) => write!(f, "Config Deserializer Failed: {}", err),
|
||||||
AppError::InvalidWorldFile => write!(f, "Invalid world file"),
|
AppError::InvalidWorldFile => write!(f, "Invalid world file"),
|
||||||
// AppError::InvalidExtensionVersion => write!(f, "Invalid extension version"),
|
// AppError::InvalidExtensionVersion => write!(f, "Invalid extension version"),
|
||||||
}
|
}
|
||||||
@ -74,3 +76,9 @@ impl<T> From<PoisonError<T>> for AppError {
|
|||||||
AppError::MutexPoisoned(err.to_string())
|
AppError::MutexPoisoned(err.to_string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<toml::de::Error> for AppError {
|
||||||
|
fn from(err: toml::de::Error) -> Self {
|
||||||
|
AppError::DeserializerError(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user