Merge remote-tracking branch 'origin/master' into feat/multi-window-support

# Conflicts:
#	native/src/command/action.rs
#	native/src/window/action.rs
#	winit/src/window.rs
This commit is contained in:
Bingus 2023-02-15 14:55:02 -08:00
commit 63fb608d8b
No known key found for this signature in database
GPG key ID: 5F84D2AA40A9F170
55 changed files with 1218 additions and 224 deletions

View file

@ -53,9 +53,9 @@ where
{
type Theme = T;
fn layout<'a, Message>(
fn layout<Message>(
&mut self,
element: &Element<'a, Message, Self>,
element: &Element<'_, Message, Self>,
limits: &layout::Limits,
) -> layout::Node {
let layout = element.as_widget().layout(self, limits);

View file

@ -49,7 +49,11 @@ impl Cache {
/// Otherwise, the previously stored [`Geometry`] will be returned. The
/// [`Cache`] is not cleared in this case. In other words, it will keep
/// returning the stored [`Geometry`] if needed.
pub fn draw(&self, bounds: Size, draw_fn: impl Fn(&mut Frame)) -> Geometry {
pub fn draw(
&self,
bounds: Size,
draw_fn: impl FnOnce(&mut Frame),
) -> Geometry {
use std::ops::Deref;
if let State::Filled {