Skip to content

get non zero byte slice from non zero borrowed array in const context #12

@hubcycle

Description

@hubcycle

Provide const method to convert NonZeroEmpty<&[u8; N]> to NonZeroEmpty<&[u8]>.

Description

Add the following method:

impl<'a, const N: usize> NonEmptyBz<&'a [u8; N]> {
	/// Converts a `NonEmptyBz<&[u8; N]` to NonEmptyBz<>.
	pub const fn as_slice(&self) -> NonEmptyBz<&'a [u8]> {
		todo!("implementation")
	}
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions