summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Geisler <mgeisler@google.com>2022-04-01 16:28:17 +0200
committerMartin Geisler <mgeisler@google.com>2022-04-04 14:08:13 +0200
commitc07057c7c43be0dbdd571f6446bc6150b42c896f (patch)
tree1053ba072984ef6795e04addac0057b5fd3be922
parent8d26041b7b6c8c3fa77038ac72151fef76316bc5 (diff)
pdl: use docstrings instead of attribute arguments
Editors typically have better support for editing text in docstrings than in attributes. Test: pdl --help Change-Id: I3b1062a188feb6d34d727442390bf1859270bf77
-rw-r--r--tools/pdl/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/pdl/src/main.rs b/tools/pdl/src/main.rs
index 5f488fd61e..7309f982d3 100644
--- a/tools/pdl/src/main.rs
+++ b/tools/pdl/src/main.rs
@@ -21,10 +21,12 @@ use crate::lint::Lintable;
#[derive(Debug, StructOpt)]
#[structopt(name = "pdl-parser", about = "Packet Description Language parser tool.")]
struct Opt {
- #[structopt(short, long = "--version", help = "Print tool version and exit.")]
+ /// Print tool version and exit.
+ #[structopt(short, long = "--version")]
version: bool,
- #[structopt(name = "FILE", help = "Input file.")]
+ /// Input file.
+ #[structopt(name = "FILE")]
input_file: String,
}