Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Merge #47
Browse files Browse the repository at this point in the history
47: Revert main error r=killercup a=killercup

Seems like what I had in mind in #31 didn't work: It breaks failure's macros and with it the waltz_cli crate. This reverts #32. I'll publish 0.1.4 if this is green (I've yanked 0.1.3).
  • Loading branch information
bors[bot] committed Feb 9, 2018
2 parents 3a2f20e + 3120c85 commit b355852
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quicli"
version = "0.1.3"
version = "0.1.4"
description = "Quickly build cool CLI apps in Rust."
authors = ["Pascal Hertleif <[email protected]>"]
readme = "Readme.md"
Expand Down
8 changes: 7 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.1.3] - 2018-02-01
## [0.1.4] - 2018-02-09

### Changed

- Reverts "`main!` now uses the more permissive `std::result::Result` enum and `std::error::Error` trait." from 0.1.3 which broke existing code

## [0.1.3] - 2018-02-01 - Yanked!

### Changed

Expand Down
6 changes: 3 additions & 3 deletions src/main_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
macro_rules! main {
(|$args:ident: $cli:ty, log_level: $verbosity:ident| $body:expr) => {
fn main() {
fn run() -> std::result::Result<(), Box<std::error::Error>> {
fn run() -> $crate::prelude::Result<()> {
let $args = <$cli>::from_args();
let log_level = match $args.verbosity {
0 => $crate::prelude::LogLevel::Error,
Expand Down Expand Up @@ -64,7 +64,7 @@ macro_rules! main {

(|$args:ident: $cli:ty| $body:expr) => {
fn main() {
fn run() -> std::result::Result<(), Box<std::error::Error>> {
fn run() -> $crate::prelude::Result<()> {
let $args = <$cli>::from_args();
$crate::prelude::LoggerBuiler::new()
.filter(Some(env!("CARGO_PKG_NAME")), $crate::prelude::LogLevel::Error.to_level_filter())
Expand All @@ -90,7 +90,7 @@ macro_rules! main {

($body:expr) => {
fn main() {
fn run() -> std::result::Result<(), Box<std::error::Error>> {
fn run() -> $crate::prelude::Result<()> {
$crate::prelude::LoggerBuiler::new()
.filter(Some(env!("CARGO_PKG_NAME")), $crate::prelude::LogLevel::Error.to_level_filter())
.filter(None, $crate::prelude::LogLevel::Warn.to_level_filter())
Expand Down

0 comments on commit b355852

Please sign in to comment.