Skip to content

pod!: list-view migration pt.2#180

Open
grod220 wants to merge 1 commit intomainfrom
list-view-migration-pt2
Open

pod!: list-view migration pt.2#180
grod220 wants to merge 1 commit intomainfrom
list-view-migration-pt2

Conversation

@grod220
Copy link
Member

@grod220 grod220 commented Feb 25, 2026

Follow up to #178

Found additional items that can be deleted/moved:

  • All errors were exclusively relevant to list-view
  • PodSlice language updated to ListView
  • Kept PodLength alias, but migrated to spl-list-view
  • To/From conversions kept in spl-pod

@grod220 grod220 mentioned this pull request Feb 25, 2026
9 tasks
@grod220 grod220 force-pushed the list-view-migration-pt2 branch from 45e5aa7 to 7e950e2 Compare February 25, 2026 13:22
Comment on lines +3 to +8
/// Marker trait for converting to/from Pod `uint`'s and `usize`
pub trait PodLength: Pod + TryFrom<usize, Error = TryFromIntError> + Into<usize> {}

/// Blanket implementation to automatically implement `PodLength` for any type
/// that satisfies the required bounds.
impl<T> PodLength for T where T: Pod + TryFrom<usize, Error = TryFromIntError> + Into<usize> {}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrated from pod/src/pod_length.rs

macro_rules! impl_usize_conversion {
($PodType:ty, $PrimitiveType:ty) => {
impl TryFrom<usize> for $PodType {
type Error = core::num::TryFromIntError;
Copy link
Member Author

@grod220 grod220 Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formerly was type Error = PodSliceError here. Moved to core err instead for this trait now that errors have been moved to spl-list-view.

@grod220 grod220 requested review from febo and joncinque February 25, 2026 13:25
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

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