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

Minor Cleanups for 0.2 #136

Merged
merged 5 commits into from
Apr 27, 2020
Merged

Minor Cleanups for 0.2 #136

merged 5 commits into from
Apr 27, 2020

Commits on Apr 27, 2020

  1. error: Make internal_error! a function

    Also make Error::code a const fn. These increase the Min Rust version to 1.33
    josephlr committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    87886c5 View commit details
    Browse the repository at this point in the history
  2. assert: Make use of asserts consistent

    - Use debug asserts in code
    - Use normal asserts in tests
    - Use *assert_eq! methods when possible
    - Remove unnecessary asserts
    josephlr committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    6c603fb View commit details
    Browse the repository at this point in the history
  3. build: Remove getrandom_uwp cfg

    As our minimum rust version is 1.33, we can just use `target_vendor`.
    josephlr committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    51d0411 View commit details
    Browse the repository at this point in the history
  4. ios: Don't use SecRandom type

    The type of the `rnd` parameter is SecRandomRef which is an alias for an
    "Opaque Pointer". This is better represented in Rust as a c_void pointer.
    
    We also know that kSecRandomDefault is NULL, so we can simplify the code.
    
    https://developer.apple.com/documentation/security/1399291-secrandomcopybytes
    https://developer.apple.com/documentation/security/secrandomref
    https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/using_imported_c_functions_in_swift
    josephlr committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    6d3b8bc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1dcc409 View commit details
    Browse the repository at this point in the history