Repository navigation
Upgrading from 0.7 to 0.8: Ref::new_slice gone?
#1974
|
Hi there, After reading through the upgrading guide in the announcement and searching in the docs, I can't seem to find a method equivalent to 0.7's // (...)
Ok(match Ref::new_slice(&rcrd_bytes[SummaryRecord::SIZE..]) {
Some(data) => data.into_slice(),
None => &{
R::default();
[] as [R; 0]
},
})Has this functionality been moved to another struct, or has it been removed entirely? Thanks |
Answered by
joshlf
Oct 24, 2024
Replies: 1 comment 1 reply
|
Given a |
1 reply
Answer selected by
ChristopherRabotin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given a
Ref<[T]>, bothRef::from_bytesandRef::into_refwill work as expected - you no longer need to special-case slices either during construction or when converting to a vanilla reference.