Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Fix guide example code #335

Open
tolvanea opened this issue Nov 9, 2019 · 0 comments
Open

Fix guide example code #335

tolvanea opened this issue Nov 9, 2019 · 0 comments

Comments

@tolvanea
Copy link

tolvanea commented Nov 9, 2019

(Beginner here, apologies if this is not valid issue.)

This guide example seems not to compile. There's this line:
use failure::err_msg;
but the called macro is:
return Err(format_err!("Input did not begin with $"));

So should the use statement be:
use failure::format_err; ?

Also there's other example, where is used

#[macro_use] extern crate failure_derive;

Could that be replaced with simpler use failure::Fail;? Then there would be no need to explicitly add failure_derive in Cargo.toml.

(As a personal opinion, the guide code could be updated to other new changes, like extern crate -> use.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant