From ab70fe68c58be6acf0ce892726da37a147226971 Mon Sep 17 00:00:00 2001 From: Sahil Upasane <110289934+404salad@users.noreply.github.com> Date: Mon, 23 Oct 2023 16:55:55 +0530 Subject: [PATCH] Use Rust 2018 format for crates (#941) --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 25adf195..6d91eafa 100644 --- a/README.md +++ b/README.md @@ -93,10 +93,7 @@ The grammar can be used to derive a `Parser` implementation automatically. Parsing returns an iterator of nested token pairs: ```rust -extern crate pest; -#[macro_use] -extern crate pest_derive; - +use pest_derive::Parser; use pest::Parser; #[derive(Parser)] @@ -104,7 +101,7 @@ use pest::Parser; struct IdentParser; fn main() { -    let pairs = IdentParser::parse(Rule::ident_list, "a1 b2").unwrap_or_else(|e| panic!("{}", e)); + let pairs = IdentParser::parse(Rule::ident_list, "a1 b2").unwrap_or_else(|e| panic!("{}", e)); // Because ident_list is silent, the iterator will contain idents for pair in pairs {