Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Fix compilation error, warnings and migrate to 2018 edition #2

Merged
merged 4 commits into from
Apr 16, 2021
Merged

Fix compilation error, warnings and migrate to 2018 edition #2

merged 4 commits into from
Apr 16, 2021

Conversation

pheki
Copy link
Member

@pheki pheki commented Mar 26, 2021

Hey, thanks for this crate!

The crate wasn't compiling for me, so I've took the opportunity to fix the warnings. Note that after all those changes, the VPK size is still the same.

I made 4 commits:

  1. Fix compilation errors in recent versions of rust, introduced by Deny the overflowing_literals lint for all editions rust-lang/rust#55632, the code was using repr(C) in enums which used values higher than isize::MAX (same as i32::MAX on vita), which is considered an overflow. Since C enums have no signedness guarantee, I only changed to repr(u32) those that would actually overflow.
  2. I've fixed all warnings in the repository
  3. I've derived Copy and Clone for Sce types, since they can be copied, are small and its how they're usually used in C. While at it, also derived Debug. I've removed #![feature(untagged_unions)] since its no longer needed.
  4. I've migrated the crates the code to the Rust 2018 edition by following the Edition Guide. If you'd rather maintain the crate in the 2015 edition, I'll just remove this commit.

I also needed to update to patch rust-script as it wasn't detecting the fn main() in some cargo-make scripts: fornwall/rust-script#18

What do you think?

@althonos
Copy link
Member

Thanks a lot! Nice job cleaning up everything. (I replied to your e-mail earlier as well btw).

@althonos althonos merged commit 876fa43 into vita-rust:master Apr 16, 2021
@pheki pheki deleted the cleanup branch April 17, 2021 08:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants