Skip to content

Commit 87ba544

Browse files
committed
docs: properly names Examples section for rustdoc
1 parent 8b1b261 commit 87ba544

File tree

8 files changed

+121
-121
lines changed

8 files changed

+121
-121
lines changed

src/app/app.rs

+42-42
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const INTERNAL_ERROR_MSG: &'static str = "Fatal internal error. Please consider
3434
/// order (so long as `.get_matches()` is the last method called).
3535
///
3636
///
37-
/// # Example
37+
/// # Examples
3838
///
3939
/// ```no_run
4040
/// # use clap::{App, Arg};
@@ -108,7 +108,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
108108
/// information. The name should not contain spaces (hyphens '-' are ok).
109109
///
110110
///
111-
/// # Example
111+
/// # Examples
112112
///
113113
/// ```no_run
114114
/// # use clap::{App, Arg};
@@ -167,7 +167,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
167167
/// YAML file (relative to the current file, like modules work). That YAML object can then be
168168
/// passed to this function.
169169
///
170-
/// # Example
170+
/// # Examples
171171
///
172172
/// ```ignore
173173
/// # use clap::App;
@@ -247,7 +247,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
247247
/// Sets a string of author(s) and will be displayed to the user when they request the help
248248
/// information with `--help` or `-h`.
249249
///
250-
/// # Example
250+
/// # Examples
251251
///
252252
/// ```no_run
253253
/// # use clap::{App, Arg};
@@ -268,7 +268,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
268268
///
269269
/// **NOTE:** This command **should not** be used for SubCommands.
270270
///
271-
/// # Example
271+
/// # Examples
272272
///
273273
/// ```no_run
274274
/// # use clap::{App, Arg};
@@ -286,7 +286,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
286286
/// Sets a string briefly describing what the program does and will be displayed when
287287
/// displaying help information.
288288
///
289-
/// # Example
289+
/// # Examples
290290
///
291291
/// ```no_run
292292
/// # use clap::{App, Arg};
@@ -306,7 +306,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
306306
/// information. This additional help is often used to describe how to use the arguments,
307307
/// or caveats to be noted.
308308
///
309-
/// # Example
309+
/// # Examples
310310
///
311311
/// ```no_run
312312
/// # use clap::App;
@@ -330,7 +330,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
330330
///
331331
/// **NOTE:** This defaults to false (using subcommand does *not* negate requirements)
332332
///
333-
/// # Example
333+
/// # Examples
334334
///
335335
/// ```no_run
336336
/// # use clap::App;
@@ -352,7 +352,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
352352
///
353353
/// **NOTE:** This defaults to false (subcommands do *not* need to be present)
354354
///
355-
/// # Example
355+
/// # Examples
356356
///
357357
/// ```no_run
358358
/// # use clap::App;
@@ -370,7 +370,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
370370
/// Sets a string of the version number to be displayed when displaying version or help
371371
/// information.
372372
///
373-
/// # Example
373+
/// # Examples
374374
///
375375
/// ```no_run
376376
/// # use clap::{App, Arg};
@@ -398,7 +398,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
398398
/// showing the usage.
399399
///
400400
///
401-
/// # Example
401+
/// # Examples
402402
///
403403
/// ```no_run
404404
/// # use clap::{App, Arg};
@@ -425,7 +425,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
425425
/// specify a `.help()` for them as well.
426426
///
427427
///
428-
/// # Example
428+
/// # Examples
429429
///
430430
/// ```no_run
431431
/// # use clap::{App, Arg};
@@ -462,7 +462,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
462462
/// non `-` chacter will be used as the `short` version
463463
///
464464
///
465-
/// # Example
465+
/// # Examples
466466
///
467467
/// ```no_run
468468
/// # use clap::{App, Arg};
@@ -487,7 +487,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
487487
/// non `-` chacter will be used as the `short` version
488488
///
489489
///
490-
/// # Example
490+
/// # Examples
491491
///
492492
/// ```no_run
493493
/// # use clap::{App, Arg};
@@ -512,7 +512,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
512512
///
513513
/// **NOTE:** Subcommands count as arguments
514514
///
515-
/// # Example
515+
/// # Examples
516516
///
517517
/// ```no_run
518518
/// # use clap::{App, Arg};
@@ -531,7 +531,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
531531
///
532532
/// **NOTE:** This does **not** hide the subcommand from usage strings on error
533533
///
534-
/// # Example
534+
/// # Examples
535535
///
536536
/// ```no_run
537537
/// # use clap::{App, SubCommand};
@@ -556,7 +556,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
556556
/// **NOTE:** The version for the current command and this setting must be set **prior** to
557557
/// adding any subcommands
558558
///
559-
/// # Example
559+
/// # Examples
560560
///
561561
/// ```no_run
562562
/// # use clap::{App, Arg, SubCommand};
@@ -585,7 +585,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
585585
///
586586
/// **NOTE:** Do not set this value to false, it will have undesired results!
587587
///
588-
/// # Example
588+
/// # Examples
589589
///
590590
/// ```no_run
591591
/// # use clap::{App, Arg, SubCommand};
@@ -612,7 +612,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
612612
///
613613
/// **NOTE:** This setting is cosmetic only and does not affect any functionality.
614614
///
615-
/// # Example
615+
/// # Examples
616616
///
617617
/// ```no_run
618618
/// # use clap::{App, Arg, SubCommand};
@@ -643,7 +643,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
643643
/// behavior for all subcommands, you must set this on each command (needing this is extremely
644644
/// rare)
645645
///
646-
/// # Example
646+
/// # Examples
647647
///
648648
/// ```no_run
649649
/// # use clap::{App, Arg};
@@ -671,7 +671,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
671671
/// still be displayed and exit. If this is *not* the desired result, consider using
672672
/// `.arg_required_else_help()`
673673
///
674-
/// # Example
674+
/// # Examples
675675
///
676676
/// ```no_run
677677
/// # use clap::{App, Arg};
@@ -688,7 +688,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
688688

689689
/// Enables Application level settings, passed as argument
690690
///
691-
/// # Example
691+
/// # Examples
692692
///
693693
/// ```no_run
694694
/// # use clap::{App, Arg, AppSettings};
@@ -721,7 +721,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
721721

722722
/// Enables multiple Application level settings, passed as argument
723723
///
724-
/// # Example
724+
/// # Examples
725725
///
726726
/// ```no_run
727727
/// # use clap::{App, Arg, AppSettings};
@@ -748,7 +748,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
748748
/// one at a time. Using `Arg::from_usage` helps with the verbosity, and still allows full
749749
/// control over the advanced configuration options.
750750
///
751-
/// # Example
751+
/// # Examples
752752
///
753753
/// ```no_run
754754
/// # use clap::{App, Arg};
@@ -1068,7 +1068,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
10681068
/// Adds multiple arguments to the list of valid possibilties by iterating over a Vec of Args
10691069
///
10701070
///
1071-
/// # Example
1071+
/// # Examples
10721072
///
10731073
/// ```no_run
10741074
/// # use clap::{App, Arg};
@@ -1096,7 +1096,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
10961096
/// `Arg` other than what `Arg::from_usage()` supports.
10971097
///
10981098
///
1099-
/// # Example
1099+
/// # Examples
11001100
///
11011101
/// ```no_run
11021102
/// # use clap::{App, Arg};
@@ -1120,7 +1120,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
11201120
/// options.
11211121
///
11221122
///
1123-
/// # Example
1123+
/// # Examples
11241124
///
11251125
/// ```no_run
11261126
/// # use clap::{App, Arg};
@@ -1160,7 +1160,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
11601160
/// group
11611161
///
11621162
///
1163-
/// # Example
1163+
/// # Examples
11641164
///
11651165
/// ```no_run
11661166
/// # use clap::{App, ArgGroup};
@@ -1224,7 +1224,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
12241224
/// group
12251225
///
12261226
///
1227-
/// # Example
1227+
/// # Examples
12281228
///
12291229
/// ```no_run
12301230
/// # use clap::{App, ArgGroup};
@@ -1252,7 +1252,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
12521252
/// usage.
12531253
///
12541254
///
1255-
/// # Example
1255+
/// # Examples
12561256
///
12571257
/// ```no_run
12581258
/// # use clap::{App, Arg, SubCommand};
@@ -1282,7 +1282,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
12821282
/// Adds multiple subcommands to the list of valid possibilties by iterating over a Vec of
12831283
/// `SubCommand`s
12841284
///
1285-
/// # Example
1285+
/// # Examples
12861286
///
12871287
/// ```no_run
12881288
/// # use clap::{App, Arg, SubCommand};
@@ -1575,7 +1575,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
15751575

15761576
/// Prints the full help message to `io::stdout()` using a `BufWriter`
15771577
///
1578-
/// # Examples
1578+
/// # Exampless
15791579
/// ```no_run
15801580
/// # use clap::App;
15811581
/// # use std::io;
@@ -1886,7 +1886,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
18861886
/// If any arguments contain invalid unicode characters. If this is not desired it is
18871887
/// recommended to use the `*_safe()` or `*_lossy()` versions of this method.
18881888
///
1889-
/// # Example
1889+
/// # Examples
18901890
///
18911891
/// ```no_run
18921892
/// # use clap::{App, Arg};
@@ -1903,7 +1903,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
19031903
/// the real parsing function for all subcommands. Invalid unicode characters are replaced with
19041904
/// `U+FFFD REPLACEMENT CHARACTER`
19051905
///
1906-
/// # Examples
1906+
/// # Exampless
19071907
///
19081908
/// ```no_run
19091909
/// # use clap::{App, Arg};
@@ -1923,7 +1923,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
19231923
/// manually.
19241924
///
19251925
///
1926-
/// # Example
1926+
/// # Examples
19271927
///
19281928
/// ```no_run
19291929
/// # use clap::{App, Arg};
@@ -1945,7 +1945,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
19451945
/// manually.
19461946
///
19471947
///
1948-
/// # Example
1948+
/// # Examples
19491949
///
19501950
/// ```no_run
19511951
/// # use clap::{App, Arg};
@@ -1969,7 +1969,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
19691969
/// `App::get_matches()`
19701970
///
19711971
///
1972-
/// # Example
1972+
/// # Examples
19731973
///
19741974
/// ```no_run
19751975
/// # use clap::{App, Arg};
@@ -2010,7 +2010,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
20102010
/// `App::get_matches()`
20112011
///
20122012
///
2013-
/// # Example
2013+
/// # Examples
20142014
///
20152015
/// ```no_run
20162016
/// # use clap::{App, Arg};
@@ -2056,7 +2056,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
20562056
/// `ClapErrorType::InvalidUnicode`
20572057
///
20582058
///
2059-
/// # Example
2059+
/// # Examples
20602060
///
20612061
/// ```no_run
20622062
/// # use clap::{App, Arg};
@@ -2089,7 +2089,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
20892089
/// manually.
20902090
///
20912091
///
2092-
/// # Example
2092+
/// # Examples
20932093
///
20942094
/// ```no_run
20952095
/// # use clap::{App, Arg};
@@ -2163,7 +2163,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
21632163
/// **NOTE:** Invalid unicode characters will result in an `Err` with type
21642164
/// `ClapErrorType::InvalidUnicode`
21652165
///
2166-
/// # Example
2166+
/// # Examples
21672167
///
21682168
/// ```no_run
21692169
/// # use clap::{App, Arg};
@@ -2198,7 +2198,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
21982198
/// **NOTE:** Invalid unicode characters will result in an `Err` with type
21992199
/// `ClapErrorType::InvalidUnicode`
22002200
///
2201-
/// # Example
2201+
/// # Examples
22022202
///
22032203
/// ```no_run
22042204
/// # use clap::{App, Arg};

0 commit comments

Comments
 (0)