mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 23:13:13 -04:00
Update MSRV to Rust 1.70.0 (#3310)
* Update to Rust 1.70 * Fix renamed clippy lint * Use let-else more * Code cleanup * Remove derelict Safety comments * Enable more clippy lints
This commit is contained in:
@@ -35,7 +35,6 @@ pub fn pos_from_touch_event(
|
||||
// search for the touch we previously used for the position
|
||||
// (unfortunately, `event.touches()` is not a rust collection):
|
||||
(0..event.touches().length())
|
||||
.into_iter()
|
||||
.map(|i| event.touches().get(i).unwrap())
|
||||
.find(|touch| egui::TouchId::from(touch.identifier()) == *touch_id_for_pos)
|
||||
} else {
|
||||
|
||||
@@ -148,9 +148,7 @@ impl WebPainter for WebPainterWgpu {
|
||||
) -> Result<(), JsValue> {
|
||||
let size_in_pixels = [self.canvas.width(), self.canvas.height()];
|
||||
|
||||
let render_state = if let Some(render_state) = &self.render_state {
|
||||
render_state
|
||||
} else {
|
||||
let Some(render_state) = &self.render_state else {
|
||||
return Err(JsValue::from_str(
|
||||
"Can't paint, wgpu renderer was already disposed",
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user