Skip to content

Unify pointer helpers #4567

@ceyonur

Description

@ceyonur

Can we unify all of these implementations?

I think a single:

func PointerTo[T any](x T) *T {
	return &x
}

should work for all our usages.

Originally posted by @StephenButtolph in ava-labs/coreth#1263 (comment)

NewUint64 has itself 173 references. I changed others but we should probably change that in another PR

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions