Skip to content

Commit e1974a4

Browse files
authored
Fix logic in example.
The example claims SuperiorThanZero and presumably Zero is not Superior than itself so it should not be allowed.
1 parent 0b7e28a commit e1974a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/convert.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ pub trait TryInto<T>: Sized {
444444
/// type Error = &'static str;
445445
///
446446
/// fn try_from(value: i32) -> Result<Self, Self::Error> {
447-
/// if value < 0 {
447+
/// if value <= 0 {
448448
/// Err("SuperiorThanZero only accepts value superior than zero!")
449449
/// } else {
450450
/// Ok(SuperiorThanZero(value))

0 commit comments

Comments
 (0)