Skip to content

Commit

Permalink
♻️ Replace failure-derive with err-derive
Browse files Browse the repository at this point in the history
  • Loading branch information
mmstick committed Mar 28, 2019
1 parent af0ebef commit bd2d448
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 83 deletions.
86 changes: 35 additions & 51 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Expand Up @@ -43,8 +43,7 @@ version_check = "0.1.3"
[dependencies]
bitflags = "1.0"
calculate = "0.5"
failure = "0.1"
failure_derive = "0.1"
err-derive = "0.1"
glob = "0.2"
itoa = "0.4"
lazy_static = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
@@ -1,5 +1,5 @@
PREFIX ?= usr/local
BINARY = $(PREFIX)/bin/ion
prefix ?= usr/local
BINARY = $(prefix)/bin/ion
RELEASE = debug
TOOLCHAIN ?= 1.31.0

Expand Down
7 changes: 3 additions & 4 deletions debian/rules
@@ -1,7 +1,6 @@
#!/usr/bin/make -f

export RUSTUP = 0
export PREFIX = /usr

# When building packages locally, `env VENDORED=0 CLEAN=0 debuild`
# will build a package using non-vendored dependencies, and
Expand All @@ -12,7 +11,7 @@ export VENDORED ?= 1
CLEAN ?= 1

%:
dh $@ --with=systemd
dh $@

override_dh_auto_clean:
ifeq ($(CLEAN),1)
Expand All @@ -25,5 +24,5 @@ ifeq ($(VENDORED),1)
fi
endif

override_dh_auto_build:
dh_auto_build
override_dh_auto_install:
dh_auto_install -- prefix=/usr
2 changes: 2 additions & 0 deletions manual/src/control/03-matches.md
Expand Up @@ -39,6 +39,8 @@ match [ five foo bar ]
end
```
## Match guards
Match guards can be added to a match to employ an additional test
```sh
Expand Down
16 changes: 1 addition & 15 deletions src/lib/lib.rs
Expand Up @@ -2,25 +2,11 @@

#[macro_use]
extern crate bitflags;
extern crate calc;
extern crate failure;
#[macro_use]
extern crate failure_derive;
extern crate glob;
extern crate hashbrown;
extern crate itertools;
extern crate itoa;
extern crate err_derive;
#[macro_use]
extern crate lazy_static;
extern crate liner;
extern crate regex;
extern crate small;
extern crate smallvec;
extern crate unicode_segmentation;
extern crate xdg;

extern crate ion_braces as braces;
extern crate ion_builtins;
extern crate ion_lexers as lexers;
extern crate ion_ranges as ranges;
extern crate ion_sys as sys;
Expand Down
10 changes: 5 additions & 5 deletions src/lib/shell/mod.rs
Expand Up @@ -71,15 +71,15 @@ use std::{
};
use xdg::BaseDirectories;

#[derive(Debug, Fail)]
#[derive(Debug, Error)]
pub enum IonError {
#[fail(display = "failed to fork: {}", why)]
#[error(display = "failed to fork: {}", why)]
Fork { why: io::Error },
#[fail(display = "element does not exist")]
#[error(display = "element does not exist")]
DoesNotExist,
#[fail(display = "input was not terminated")]
#[error(display = "input was not terminated")]
Unterminated,
#[fail(display = "function error: {}", why)]
#[error(display = "function error: {}", why)]
Function { why: FunctionError },
}

Expand Down
4 changes: 0 additions & 4 deletions src/main.rs
@@ -1,8 +1,4 @@
extern crate getopts;
extern crate ion_shell;
extern crate ion_sys as sys;
extern crate small;
extern crate smallvec;

use getopts::Options;
use ion_shell::{flags::NO_EXEC, Binary, JobControl, ShellBuilder, MAN_ION};
Expand Down

0 comments on commit bd2d448

Please sign in to comment.