Skip to content

Commit

Permalink
crates/core/no_std_readers: Add From trait for ZCursor
Browse files Browse the repository at this point in the history
  • Loading branch information
etemesi254 committed Apr 1, 2024
1 parent 23c8bb1 commit dc49644
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/zune-core/src/bytestream/reader/no_std_readers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,8 @@ impl<T: AsRef<[u8]>> std::io::Seek for ZCursor<T> {
// self.read_bytes(buf).map_err(|x|{ std::io::Error::new()})
// }
// }
impl<T: AsRef<[u8]>> From<T> for ZCursor<T> {
fn from(value: T) -> Self {
ZCursor::new(value)
}
}

0 comments on commit dc49644

Please sign in to comment.