1
Fork 0

Rename SuperiorThanZero -> GreaterThanZero

This commit is contained in:
Kevin Cox 2019-11-02 13:12:07 +00:00 committed by GitHub
parent e1974a4f1f
commit e7fd580e7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -438,16 +438,16 @@ pub trait TryInto<T>: Sized {
/// ```
/// use std::convert::TryFrom;
///
/// struct SuperiorThanZero(i32);
/// struct GreaterThanZero(i32);
///
/// impl TryFrom<i32> for SuperiorThanZero {
/// impl TryFrom<i32> for GreaterThanZero {
/// type Error = &'static str;
///
/// fn try_from(value: i32) -> Result<Self, Self::Error> {
/// if value <= 0 {
/// Err("SuperiorThanZero only accepts value superior than zero!")
/// Err("GreaterThanZero only accepts value superior than zero!")
/// } else {
/// Ok(SuperiorThanZero(value))
/// Ok(GreaterThanZero(value))
/// }
/// }
/// }