From c05d2850420a2c163b8f62c33a6cef7c0ae1ad8d Mon Sep 17 00:00:00 2001 From: Vladislav Stepanov <8uk.8ak@gmail.com> Date: Fri, 14 Apr 2023 23:18:58 +0400 Subject: Workspace reorder (#868) * Try different workspace structure Move main crate (atuin) to be on the same level with other crates in this workspace * extract common dependencies to the workspace definition * fix base64 v0.21 deprecation warning * questionable: update deps & fix chrono deprecations possible panic sites are unchanged, they're just more visible now * Revert "questionable: update deps & fix chrono deprecations" This reverts commit 993e60f8dea81a1625a04285a617959ad09a0866. --- src/ratatui/widgets/canvas/rectangle.rs | 52 --------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/ratatui/widgets/canvas/rectangle.rs (limited to 'src/ratatui/widgets/canvas/rectangle.rs') diff --git a/src/ratatui/widgets/canvas/rectangle.rs b/src/ratatui/widgets/canvas/rectangle.rs deleted file mode 100644 index 07ac9137..00000000 --- a/src/ratatui/widgets/canvas/rectangle.rs +++ /dev/null @@ -1,52 +0,0 @@ -use crate::ratatui::{ - style::Color, - widgets::canvas::{Line, Painter, Shape}, -}; - -/// Shape to draw a rectangle from a `Rect` with the given color -#[derive(Debug, Clone)] -pub struct Rectangle { - pub x: f64, - pub y: f64, - pub width: f64, - pub height: f64, - pub color: Color, -} - -impl Shape for Rectangle { - fn draw(&self, painter: &mut Painter) { - let lines: [Line; 4] = [ - Line { - x1: self.x, - y1: self.y, - x2: self.x, - y2: self.y + self.height, - color: self.color, - }, - Line { - x1: self.x, - y1: self.y + self.height, - x2: self.x + self.width, - y2: self.y + self.height, - color: self.color, - }, - Line { - x1: self.x + self.width, - y1: self.y, - x2: self.x + self.width, - y2: self.y + self.height, - color: self.color, - }, - Line { - x1: self.x, - y1: self.y, - x2: self.x + self.width, - y2: self.y, - color: self.color, - }, - ]; - for line in &lines { - line.draw(painter); - } - } -} -- cgit v1.3.1