Skip to content

Conversation

@bengineer42
Copy link

@bengineer42 bengineer42 commented Dec 11, 2025

Gave Span the ToSpanTrait to help with generics eg:

    fn do_something_on_many<TS, T, +ToSpanTrait<TS, T>>(collection: TS){
        collection.to_span().into_iter().map(|c| c.do_something())
   }

Where do_something_on_many can take Span<T>, Array<T> or [T; N] and in some cases of [T; N] It can solve the Non zero complier issues

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @bengineer42)


-- commits line 2 at r1:
add an issue to track what you are actually trying to fix.

@bengineer42
Copy link
Author

#9063 linked

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.

3 participants