Skip to content

How to match AxisId? #230

Closed
Closed

Description

@swiftcoder

I'm having trouble matching the AxisId struct, in order to process DeviceEvents. Is there something I'm missing here, or are these tuple-structs impossible to check for equality?

error: numeric fields in struct patterns are unstable (see issue #35626)
  --> src/main.rs:68:40
   |
68 |                         glutin::AxisId{0: 0} => app.yaw(value),
   |                                        ^^^^
error[E0532]: expected tuple struct/variant, found struct `glutin::AxisId`
  --> src/main.rs:68:25
   |
68 |                         glutin::AxisId(0) => app.yaw(value),
   |                         ^^^^^^^^^^^^^^ did you mean `glutin::AxisId { /* fields */ }`?

Activity

  1. Ralith commented on Jul 16, 2017

    @Ralith
    Contributor

    See #211

  2. Ralith commented on Jul 23, 2017

    @Ralith
    Contributor

    Closing since #211 was merged--AxisId is now an alias for u32 and can be matched as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions