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

Fix guide example code  #335

Open
Open
@tolvanea

Description

@tolvanea

(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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions