mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-21 21:42:23 -05:00
Fix tests
This commit is contained in:
parent
097f3c74ea
commit
2afe6b38d3
2 changed files with 8 additions and 5 deletions
|
@ -32,9 +32,10 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn explains_why_generating_nametag_text_fails() {
|
fn explains_why_generating_nametag_text_fails() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
generate_nametag_text(String::new()).as_deref(),
|
generate_nametag_text(String::new())
|
||||||
// Don't change this line
|
.as_ref()
|
||||||
Err("`name` was empty; it must be nonempty."),
|
.map_err(|e| e.as_str()),
|
||||||
|
Err("Empty names aren't allowed"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,10 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn explains_why_generating_nametag_text_fails() {
|
fn explains_why_generating_nametag_text_fails() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
generate_nametag_text(String::new()).as_deref(),
|
generate_nametag_text(String::new())
|
||||||
Err("`name` was empty; it must be nonempty."),
|
.as_ref()
|
||||||
|
.map_err(|e| e.as_str()),
|
||||||
|
Err("Empty names aren't allowed"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue