We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0a28415 + e7fd580 commit 370d01aCopy full SHA for 370d01a
src/libcore/convert.rs
@@ -438,16 +438,16 @@ pub trait TryInto<T>: Sized {
438
/// ```
439
/// use std::convert::TryFrom;
440
///
441
-/// struct SuperiorThanZero(i32);
+/// struct GreaterThanZero(i32);
442
443
-/// impl TryFrom<i32> for SuperiorThanZero {
+/// impl TryFrom<i32> for GreaterThanZero {
444
/// type Error = &'static str;
445
446
/// fn try_from(value: i32) -> Result<Self, Self::Error> {
447
-/// if value < 0 {
448
-/// Err("SuperiorThanZero only accepts value superior than zero!")
+/// if value <= 0 {
+/// Err("GreaterThanZero only accepts value superior than zero!")
449
/// } else {
450
-/// Ok(SuperiorThanZero(value))
+/// Ok(GreaterThanZero(value))
451
/// }
452
453
0 commit comments