From f9dff389892ca15996343115b977b0f46d7e6bbc Mon Sep 17 00:00:00 2001
From: David Duarte <licorne@google.com>
Date: Wed, 13 Apr 2022 08:33:49 +0000
Subject: [PATCH] PDL: Remove unnecessary `extern crate`

Test: compiles
Change-Id: Ifcd68ba5864183e89f902ebed62ae18bd3dd3738
---
 tools/pdl/src/main.rs   | 11 +----------
 tools/pdl/src/parser.rs |  2 +-
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/tools/pdl/src/main.rs b/tools/pdl/src/main.rs
index 7309f982d39..ff5c585143a 100644
--- a/tools/pdl/src/main.rs
+++ b/tools/pdl/src/main.rs
@@ -1,15 +1,6 @@
 //! PDL parser and linter.
 
-extern crate codespan_reporting;
-extern crate pest;
-#[macro_use]
-extern crate pest_derive;
-extern crate serde;
-extern crate serde_json;
-extern crate structopt;
-
-use codespan_reporting::term;
-use codespan_reporting::term::termcolor;
+use codespan_reporting::term::{self, termcolor};
 use structopt::StructOpt;
 
 mod ast;
diff --git a/tools/pdl/src/parser.rs b/tools/pdl/src/parser.rs
index bea80e00309..f204e6f5d0f 100644
--- a/tools/pdl/src/parser.rs
+++ b/tools/pdl/src/parser.rs
@@ -9,7 +9,7 @@ use std::iter::{Filter, Peekable};
 // TODO: use #[grammar = "pdl.pest"]
 // currently not possible because CARGO_MANIFEST_DIR is not set
 // in soong environment.
-#[derive(Parser)]
+#[derive(pest_derive::Parser)]
 #[grammar_inline = r#"
 WHITESPACE = _{ " " | "\n" }
 COMMENT = { block_comment | line_comment }
-- 
GitLab