style: fix formatting

There are a couple of small formatting changes in the current nightly
This commit is contained in:
Josh McKinney 2023-07-02 00:55:00 -07:00
parent ec411bb1cd
commit 72a912820a
No known key found for this signature in database
GPG key ID: 722287396A903BC5
2 changed files with 9 additions and 3 deletions

View file

@ -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 {

View file

@ -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(