]> git.proxmox.com Git - rustc.git/blobdiff - vendor/clap/src/builder/action.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / vendor / clap / src / builder / action.rs
index ab33142909233cb7c524b998ae7d19d2c29699ad..71a91a8b1b3e6fad7c6e6ca831a195b2e77c2170 100644 (file)
@@ -183,16 +183,16 @@ pub enum ArgAction {
     /// assert!(matches.contains_id("flag"));
     /// assert_eq!(matches.occurrences_of("flag"), 0);
     /// assert_eq!(
-    ///     matches.get_one::<u8>("flag").copied(),
-    ///     Some(2)
+    ///     matches.get_count("flag"),
+    ///     2
     /// );
     ///
     /// let matches = cmd.try_get_matches_from(["mycmd"]).unwrap();
     /// assert!(matches.contains_id("flag"));
     /// assert_eq!(matches.occurrences_of("flag"), 0);
     /// assert_eq!(
-    ///     matches.get_one::<u8>("flag").copied(),
-    ///     Some(0)
+    ///     matches.get_count("flag"),
+    ///     0
     /// );
     /// ```
     Count,