Skip to content

Commit e9f8318

Browse files
committed
Auto merge of #361 - rap2hpoutre:patch-1, r=BurntSushi
Fix example in documentation see #359 I choose to write: ```rust assert_eq!("2010".to_string(), caps["year"]); ``` But I could have choose: ```rust assert_eq!("2010", &caps["year"]); ``` Not sure which one is the best (maybe none of them)
2 parents 3757bbf + b9ac569 commit e9f8318

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ fn main() {
5555
").unwrap();
5656
let caps = re.captures("2010-03-14").unwrap();
5757

58-
assert_eq!("2010", caps["year"]);
59-
assert_eq!("03", caps["month"]);
60-
assert_eq!("14", caps["day"]);
58+
assert_eq!("2010", &caps["year"]);
59+
assert_eq!("03", &caps["month"]);
60+
assert_eq!("14", &caps["day"]);
6161
}
6262
```
6363

0 commit comments

Comments
 (0)