Skip to content

Code simplification #3

@hatahet

Description

@hatahet

The following code https://github.com/carlhuda/cargo/blob/master/src/bin/cargo-read-manifest.rs#L47-L49 can be re-written as:

for err in decoder.error.iter() {
    fail!("Error: {}", err);
}

or

decoder.error.map(|err| fail!("Error: {}", err));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions