Skip to content

Commit

Permalink
Remove serde implementations from ControlFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
Osspial committed Nov 9, 2018
1 parent 92ac3d6 commit 5289d22
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- Can be used to perform logic that depends on all events being processed (e.g. an iteration of a game loop).
- `LoopDestroyed` is emitted when the `run` or `run_return` method is about to exit.
- Rename `MonitorId` to `MonitorHandle`.
- Removed `serde` implementations from `ControlFlow`.

# Version 0.18.0 (2018-11-07)

Expand Down
1 change: 0 additions & 1 deletion src/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ impl<T> std::fmt::Debug for EventLoop<T> {
///
/// [events_cleared]: ../event/enum.Event.html#variant.EventsCleared
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum ControlFlow {
/// When the current loop iteration finishes, immediately begin a new iteration regardless of
/// whether or not new events are available to process.
Expand Down
7 changes: 3 additions & 4 deletions tests/serde_objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
extern crate serde;
extern crate winit;

use winit::{ControlFlow, MouseCursor};
use winit::{
use winit::window::{MouseCursor};
use winit::event::{
KeyboardInput, TouchPhase, ElementState, MouseButton, MouseScrollDelta, VirtualKeyCode,
ModifiersState
};
Expand All @@ -14,8 +14,7 @@ use serde::{Serialize, Deserialize};
fn needs_serde<S: Serialize + Deserialize<'static>>() {}

#[test]
fn root_serde() {
needs_serde::<ControlFlow>();
fn window_serde() {
needs_serde::<MouseCursor>();
}

Expand Down

0 comments on commit 5289d22

Please sign in to comment.