mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Port from Failure to Snafu (#281)
* Failure -> Snafu for build command * Port skeletal remains of init to snafu * failure -> snafu for serve * failure -> snafu for upload, remove impl_from macro * failure -> custom error in vfs * Bye bye, failure * Fix Rust 1.36 build regression
This commit is contained in:
parent
41396367ac
commit
1b9e90e786
10 changed files with 99 additions and 104 deletions
|
|
@ -1,17 +1,17 @@
|
|||
use failure::Fail;
|
||||
use snafu::Snafu;
|
||||
|
||||
use crate::{cli::InitCommand, project::ProjectError};
|
||||
use crate::cli::InitCommand;
|
||||
|
||||
#[derive(Debug, Fail)]
|
||||
pub enum InitError {
|
||||
#[fail(display = "Project init error: {}", _0)]
|
||||
ProjectError(#[fail(cause)] ProjectError),
|
||||
#[derive(Debug, Snafu)]
|
||||
pub struct InitError(Error);
|
||||
|
||||
#[derive(Debug, Snafu)]
|
||||
enum Error {}
|
||||
|
||||
pub fn init(options: InitCommand) -> Result<(), InitError> {
|
||||
Ok(init_inner(options)?)
|
||||
}
|
||||
|
||||
impl_from!(InitError {
|
||||
ProjectError => ProjectError,
|
||||
});
|
||||
|
||||
pub fn init(_options: InitCommand) -> Result<(), InitError> {
|
||||
fn init_inner(_options: InitCommand) -> Result<(), Error> {
|
||||
unimplemented!("init command");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue