Update to Rust 2024 and fix compiler errors
This commit is contained in:
parent
81ca3d2a22
commit
67e489e382
6 changed files with 13 additions and 13 deletions
|
|
@ -122,13 +122,13 @@ members = [
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.14.0-dev"
|
version = "0.14.0-dev"
|
||||||
authors = ["Héctor Ramón Jiménez <hector@hecrj.dev>"]
|
authors = ["Héctor Ramón Jiménez <hector@hecrj.dev>"]
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/iced-rs/iced"
|
repository = "https://github.com/iced-rs/iced"
|
||||||
homepage = "https://iced.rs"
|
homepage = "https://iced.rs"
|
||||||
categories = ["gui"]
|
categories = ["gui"]
|
||||||
keywords = ["gui", "ui", "graphics", "interface", "widgets"]
|
keywords = ["gui", "ui", "graphics", "interface", "widgets"]
|
||||||
rust-version = "1.82"
|
rust-version = "1.85"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
iced = { version = "0.14.0-dev", path = "." }
|
iced = { version = "0.14.0-dev", path = "." }
|
||||||
|
|
|
||||||
|
|
@ -1252,7 +1252,7 @@ impl PartialEq<Code> for Physical {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn eq(&self, rhs: &Code) -> bool {
|
fn eq(&self, rhs: &Code) -> bool {
|
||||||
match self {
|
match self {
|
||||||
Physical::Code(ref code) => code == rhs,
|
Physical::Code(code) => code == rhs,
|
||||||
Physical::Unidentified(_) => false,
|
Physical::Unidentified(_) => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1269,7 +1269,7 @@ impl PartialEq<NativeCode> for Physical {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn eq(&self, rhs: &NativeCode) -> bool {
|
fn eq(&self, rhs: &NativeCode) -> bool {
|
||||||
match self {
|
match self {
|
||||||
Physical::Unidentified(ref code) => code == rhs,
|
Physical::Unidentified(code) => code == rhs,
|
||||||
Physical::Code(_) => false,
|
Physical::Code(_) => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ where
|
||||||
let size = size.unwrap_or_else(|| renderer.default_size());
|
let size = size.unwrap_or_else(|| renderer.default_size());
|
||||||
let font = font.unwrap_or_else(|| renderer.default_font());
|
let font = font.unwrap_or_else(|| renderer.default_font());
|
||||||
|
|
||||||
let State(ref mut paragraph) = state;
|
let State(paragraph) = state;
|
||||||
|
|
||||||
paragraph.update(text::Text {
|
paragraph.update(text::Text {
|
||||||
content,
|
content,
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,8 @@ use crate::core::window;
|
||||||
use crate::core::{
|
use crate::core::{
|
||||||
Element, Event, Font, Point, Rectangle, Settings, Size, SmolStr,
|
Element, Event, Font, Point, Rectangle, Settings, Size, SmolStr,
|
||||||
};
|
};
|
||||||
use crate::runtime::user_interface;
|
|
||||||
use crate::runtime::UserInterface;
|
use crate::runtime::UserInterface;
|
||||||
|
use crate::runtime::user_interface;
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
@ -459,7 +459,9 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Turns the [`Simulator`] into the sequence of messages produced by any interactions.
|
/// Turns the [`Simulator`] into the sequence of messages produced by any interactions.
|
||||||
pub fn into_messages(self) -> impl Iterator<Item = Message> {
|
pub fn into_messages(
|
||||||
|
self,
|
||||||
|
) -> impl Iterator<Item = Message> + use<Message, Theme, Renderer> {
|
||||||
self.messages.into_iter()
|
self.messages.into_iter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -688,10 +688,10 @@ where
|
||||||
.iter()
|
.iter()
|
||||||
.zip(&self.contents)
|
.zip(&self.contents)
|
||||||
.zip(layout.children())
|
.zip(layout.children())
|
||||||
.filter(|((&pane, _content), _layout)| {
|
.filter(|((pane, _content), _layout)| {
|
||||||
self.internal
|
self.internal
|
||||||
.maximized()
|
.maximized()
|
||||||
.map_or(true, |maximized| pane == maximized)
|
.map_or(true, |maximized| **pane == maximized)
|
||||||
})
|
})
|
||||||
.find_map(|((_pane, content), layout)| {
|
.find_map(|((_pane, content), layout)| {
|
||||||
content.grid_interaction(
|
content.grid_interaction(
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
use std::ops::RangeInclusive;
|
use std::ops::RangeInclusive;
|
||||||
|
|
||||||
pub use crate::slider::{
|
pub use crate::slider::{
|
||||||
default, Catalog, Handle, HandleShape, Status, Style, StyleFn,
|
Catalog, Handle, HandleShape, Status, Style, StyleFn, default,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::core::border::Border;
|
use crate::core::border::Border;
|
||||||
|
|
@ -393,9 +393,7 @@ where
|
||||||
shell.capture_event();
|
shell.capture_event();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Event::Keyboard(keyboard::Event::KeyPressed {
|
Event::Keyboard(keyboard::Event::KeyPressed { key, .. }) => {
|
||||||
ref key, ..
|
|
||||||
}) => {
|
|
||||||
if cursor.is_over(layout.bounds()) {
|
if cursor.is_over(layout.bounds()) {
|
||||||
match key {
|
match key {
|
||||||
Key::Named(key::Named::ArrowUp) => {
|
Key::Named(key::Named::ArrowUp) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue