Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented May 17, 2024

  • Rename some non-deprecated FromBytes methods:
    • mut_from -> mut_from_bytes
    • mut_from_with_elems -> mut_from_bytes_with_elems
    • read_from -> read_from_bytes
  • Add missing deprecated Ref methods:
    • new_unaligned
    • new_unaligned_from_prefix
    • new_unaligned_from_suffix
  • In FromBytes, coalesce deprecated methods at the end of the trait
  • Update names in deprecation messages (some names were stale)
  • Make all deprecated methods return Options rather than Results, consistent with their equivalents on 0.7
  • Mark all deprecated methods as #[inline(always)]

Makes progress on #871

- Rename some non-deprecated `FromBytes` methods:
  - `mut_from` -> `mut_from_bytes`
  - `mut_from_with_elems` -> `mut_from_bytes_with_elems`
  - `read_from` -> `read_from_bytes`
- Add missing deprecated `Ref` methods:
  - `new_unaligned`
  - `new_unaligned_from_prefix`
  - `new_unaligned_from_suffix`
- In `FromBytes`, coalesce deprecated methods at the end of the trait
- Update names in deprecation messages (some names were stale)
- Make all deprecated methods return `Option`s rather than `Result`s,
  consistent with their equivalents on 0.7
- Mark all deprecated methods as `#[inline(always)]`

Makes progress on #871
@joshlf joshlf requested a review from jswrenn May 17, 2024 17:54
@joshlf joshlf enabled auto-merge May 17, 2024 17:54
@joshlf joshlf added this pull request to the merge queue May 17, 2024
Merged via the queue into main with commit 36e0a61 May 17, 2024
@joshlf joshlf deleted the deprecated-ref-methods branch May 17, 2024 18:27
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 this pull request may close these issues.

2 participants