Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatched types on language enum: expected u8, found i8 #195

Open
DeltaF1 opened this issue Nov 8, 2024 · 0 comments · May be fixed by #196
Open

Mismatched types on language enum: expected u8, found i8 #195

DeltaF1 opened this issue Nov 8, 2024 · 0 comments · May be fixed by #196

Comments

@DeltaF1
Copy link
Contributor

DeltaF1 commented Nov 8, 2024

This change upstream devkitPro/libctru#553 changed the enum repr for CFG_Language from u8 to i8. It seems this was done to accommodate the error applet which interprets the language enum differently (0 means use the system default). There is no actual change to the values of the existing enum constants, just their repr.

error[E0308]: mismatched types
  --> /home/-/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/4a15ec9/ctru-rs/src/services/cfgu.rs:35:16
   |
35 |     Japanese = ctru_sys::CFG_LANGUAGE_JP,
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

error[E0308]: mismatched types
  --> /home/-/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/4a15ec9/ctru-rs/src/services/cfgu.rs:37:15
   |
37 |     English = ctru_sys::CFG_LANGUAGE_EN,
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

error[E0308]: mismatched types
  --> /home/-/.cargo/git/checkouts/ctru-rs-1206856f7a5d76bc/4a15ec9/ctru-rs/src/services/cfgu.rs:39:14
   |
39 |     French = ctru_sys::CFG_LANGUAGE_FR,
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`

@DeltaF1 DeltaF1 linked a pull request Nov 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant