docs(rect): update the outdated comment for Rect::area() (#2100)

The return value of Rect.area() is no longer of u16 type, and the value
is not being clumped anymore.
This commit is contained in:
eqsdxr 2025-09-26 00:35:05 +05:00 committed by GitHub
parent a89d3d62ff
commit 40f13c6a6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -164,8 +164,7 @@ impl Rect {
}
}
/// The area of the `Rect`. If the area is larger than the maximum value of `u16`, it will be
/// clamped to `u16::MAX`.
/// The area of the `Rect`.
pub const fn area(self) -> u32 {
(self.width as u32) * (self.height as u32)
}