solana icon indicating copy to clipboard operation
solana copied to clipboard

SDK: refactor `Signer` and `Signers` traits

Open billythedummy opened this issue 1 year ago • 1 comments

Problem

See #34983

Summary of Changes

  • Remove From blanket impl for Signer
  • add ?Sized trait bound to blanket impl for Signer for Box<dyn Signer>
  • retain Deref blanket impl for Signer
  • refactor Signers to blanket impl for all types where their references impls IntoIterator yielding Signer refs

Fixes #34983

billythedummy avatar Jan 27 '24 06:01 billythedummy

Sorry for the lateness on the review: this comes in at a great time, since we're planning on moving to 2.0 and removing old stuff anyway, so we should be able to accept the breaking change of removing the blanket From impl.

The change looks good, and I'll be so happy to avoid having to write as_ref() everywhere, it's been such an annoyance for a long time.

Can you rebase your branch to see what breaks downstream?

joncinque avatar Feb 21 '24 00:02 joncinque

Can you rebase your branch to see what breaks downstream?

Just merged master into this branch. Building takes too long on my machine so I'm just using the CI checks to see what breaks haha

billythedummy avatar Feb 27 '24 19:02 billythedummy

Just merged master into this branch. Building takes too long on my machine so I'm just using the CI checks to see what breaks haha

We much prefer rebases to merge commits.

CriesofCarrots avatar Feb 27 '24 19:02 CriesofCarrots