From 34f46e7502a562ffb1a3f681046c6cb7e86f7286 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 3 Dec 2021 12:48:07 +0900 Subject: Bump rust to 1.57, fix new lint failures --- helix-view/src/graphics.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'helix-view/src') 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. -- cgit v1.2.3-70-g09d2