Fix logic in example.
The example claims SuperiorThanZero and presumably Zero is not Superior than itself so it should not be allowed.
This commit is contained in:
parent
0b7e28a161
commit
e1974a4f1f
1 changed files with 1 additions and 1 deletions
|
@ -444,7 +444,7 @@ pub trait TryInto<T>: Sized {
|
|||
/// type Error = &'static str;
|
||||
///
|
||||
/// fn try_from(value: i32) -> Result<Self, Self::Error> {
|
||||
/// if value < 0 {
|
||||
/// if value <= 0 {
|
||||
/// Err("SuperiorThanZero only accepts value superior than zero!")
|
||||
/// } else {
|
||||
/// Ok(SuperiorThanZero(value))
|
||||
|
|
Loading…
Reference in a new issue