Improve consistency of match branches in quad::Batch::add

This commit is contained in:
Héctor Ramón Jiménez 2023-05-30 01:16:30 +02:00
parent cd7d33aa8e
commit 9659e6a848
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -264,15 +264,13 @@ impl Batch {
Kind::Solid
}
Background::Gradient(gradient) => {
let quad = Gradient {
self.gradients.push(Gradient {
gradient: graphics::gradient::pack(
gradient,
Rectangle::new(quad.position.into(), quad.size.into()),
),
quad,
};
self.gradients.push(quad);
});
Kind::Gradient
}