edr icon indicating copy to clipboard operation
edr copied to clipboard

Remove `Deref` implementation from non-pointer types

Open alcuadrado opened this issue 1 year ago • 0 comments

I stumbled upon a Deref implementation in PendingTransaction, and I was told that they should only be used with pointer types. I didn't remove it to avoid generating conflicts, and instead, I'm just opening the issue with a list of the types implementing Deref.

Documentation explaining why Deref and DerefMut should only used for smart pointer.

Definition of Done Remove occurrences of Deref and DerefMut, wherever possible. A (non-exhaustive) list:

  • [ ] ZeroXPrefixedBytes
  • [ ] ReceiptLog
  • [ ] FullBlockLo
  • [ ] TestRpcClient
  • [ ] BlockReceipt
  • [ ] PendingTransaction
  • [ ] MemPool
  • [ ] FilterLog
  • [ ] State
  • [ ] Receipt
  • [ ] Blockchain
  • [ ] Block
  • [ ] EdrContext
  • [ ] Config
  • [ ] PendingTransaction
  • [ ] AccountModifierFn
  • [ ] TestForkState
  • [ ] TestForkState
  • [ ] MineBlockResult

alcuadrado avatar Oct 27 '23 20:10 alcuadrado