Notable things I've had to fix due to 1.78:
- Better detection of unused items
- New clippy lint (`assigning_clones`) that points out places where assignment operations with clone rhs could be replaced with more performant `clone_into`
Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-05-05 15:02:50 +02:00 committed by GitHub
parent 9ec0927701
commit 1a9b0536a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 49 additions and 433 deletions

View file

@ -342,14 +342,6 @@ impl Platform for WindowsPlatform {
WindowsDisplay::displays()
}
fn display(&self, id: crate::DisplayId) -> Option<Rc<dyn PlatformDisplay>> {
if let Some(display) = WindowsDisplay::new(id) {
Some(Rc::new(display) as Rc<dyn PlatformDisplay>)
} else {
None
}
}
fn primary_display(&self) -> Option<Rc<dyn PlatformDisplay>> {
if let Some(display) = WindowsDisplay::primary_monitor() {
Some(Rc::new(display) as Rc<dyn PlatformDisplay>)
@ -511,14 +503,6 @@ impl Platform for WindowsPlatform {
.detach();
}
fn on_become_active(&self, callback: Box<dyn FnMut()>) {
self.inner.callbacks.lock().become_active = Some(callback);
}
fn on_resign_active(&self, callback: Box<dyn FnMut()>) {
self.inner.callbacks.lock().resign_active = Some(callback);
}
fn on_quit(&self, callback: Box<dyn FnMut()>) {
self.inner.callbacks.lock().quit = Some(callback);
}
@ -527,10 +511,6 @@ impl Platform for WindowsPlatform {
self.inner.callbacks.lock().reopen = Some(callback);
}
fn on_event(&self, callback: Box<dyn FnMut(PlatformInput) -> bool>) {
self.inner.callbacks.lock().event = Some(callback);
}
// todo(windows)
fn set_menus(&self, menus: Vec<Menu>, keymap: &Keymap) {}