mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-24 21:53:21 +00:00
style: fix formatting
There are a couple of small formatting changes in the current nightly
This commit is contained in:
parent
ec411bb1cd
commit
72a912820a
2 changed files with 9 additions and 3 deletions
|
@ -15,8 +15,12 @@ pub struct Line {
|
|||
|
||||
impl Shape for Line {
|
||||
fn draw(&self, painter: &mut Painter) {
|
||||
let Some((x1, y1)) = painter.get_point(self.x1, self.y1) else { return };
|
||||
let Some((x2, y2)) = painter.get_point(self.x2, self.y2) else { return };
|
||||
let Some((x1, y1)) = painter.get_point(self.x1, self.y1) else {
|
||||
return;
|
||||
};
|
||||
let Some((x2, y2)) = painter.get_point(self.x2, self.y2) else {
|
||||
return;
|
||||
};
|
||||
let (dx, x_range) = if x2 >= x1 {
|
||||
(x2 - x1, x1..=x2)
|
||||
} else {
|
||||
|
|
|
@ -459,7 +459,9 @@ where
|
|||
|
||||
let width = canvas_area.width as usize;
|
||||
|
||||
let Some(ref painter) = self.painter else { return };
|
||||
let Some(ref painter) = self.painter else {
|
||||
return;
|
||||
};
|
||||
|
||||
// Create a blank context that match the size of the canvas
|
||||
let mut ctx = Context::new(
|
||||
|
|
Loading…
Reference in a new issue