mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 20:21:38 +00:00
Add impl_from! macro to shorten up error code
This commit is contained in:
parent
9d3638fa46
commit
aae1d8b34f
6 changed files with 41 additions and 56 deletions
|
|
@ -15,11 +15,9 @@ pub enum InitError {
|
|||
ProjectInitError(#[fail(cause)] ProjectInitError)
|
||||
}
|
||||
|
||||
impl From<ProjectInitError> for InitError {
|
||||
fn from(error: ProjectInitError) -> InitError {
|
||||
InitError::ProjectInitError(error)
|
||||
}
|
||||
}
|
||||
impl_from!(InitError {
|
||||
ProjectInitError => ProjectInitError,
|
||||
});
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct InitOptions<'a> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue