From fb603d35abe3ccd5bd0e936d1bf980a91b93c000 Mon Sep 17 00:00:00 2001 From: filsmick Date: Sat, 23 May 2015 10:45:57 +0200 Subject: [PATCH] Code example used `has_match`, which doesn't exist, instead of `has_arg` --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f79f5d6..7025b63 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ use std::env; use pirate::Matches; + fn main() { let opts = &["n:", "b/boop", ":input"]; @@ -108,7 +109,7 @@ fn main() { }; // Print the program help if necessary - if matches.has_match("h") || matches.has_match("help") { + if matches.has_arg("h") || matches.has_arg("help") { help(); return; } @@ -119,11 +120,11 @@ fn main() { None => 1 }; - let sum = input + num; + let sum = input + num; - println!("{} + {} = {}", input, num, sum); + println!("{} + {} = {}", input, num, sum); - if matches.has_match("b") || matches.has_match("boop") { + if matches.has_arg("b") || matches.has_arg("boop") { println!("Boop!!"); } }