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:
Kevin Cox 2019-10-30 12:56:54 +00:00 committed by GitHub
parent 0b7e28a161
commit e1974a4f1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))