diff options
author | Blaž Hrastnik | 2021-12-03 03:48:07 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-12-03 03:48:07 +0000 |
commit | 34f46e7502a562ffb1a3f681046c6cb7e86f7286 (patch) | |
tree | f6697c3cdfe5c5899180c8c93f39cea0dff03ddb /helix-view/src | |
parent | d31bef7fea1aa0cc9455cf082825ccff9614ed5e (diff) |
Bump rust to 1.57, fix new lint failures
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/graphics.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/helix-view/src/graphics.rs b/helix-view/src/graphics.rs index 0bfca04a..b8e43ba5 100644 --- a/helix-view/src/graphics.rs +++ b/helix-view/src/graphics.rs @@ -25,7 +25,7 @@ pub struct Margin { /// A simple rectangle used in the computation of the layout and to give widgets an hint about the
/// area they are supposed to render to. (x, y) = (0, 0) is at the top left corner of the screen.
-#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
+#[derive(Debug, Default, Clone, Copy, Hash, PartialEq, Eq)]
pub struct Rect {
pub x: u16,
pub y: u16,
@@ -33,17 +33,6 @@ pub struct Rect { pub height: u16,
}
-impl Default for Rect {
- fn default() -> Rect {
- Rect {
- x: 0,
- y: 0,
- width: 0,
- height: 0,
- }
- }
-}
-
impl Rect {
/// Creates a new rect, with width and height limited to keep the area under max u16.
/// If clipped, aspect ratio will be preserved.
|