**### Summary
Both facet and library emit the OwnershipTransferred event before updating the stored owner variable. Emitting events after the state change is the conventional pattern and reduces cognitive load for auditors.
Suggested change
Change ordering from:
emit OwnershipTransferred(s.owner, _newOwner);
s.owner = _newOwner;
to:
address previousOwner = s.owner;
s.owner = _newOwner;
emit OwnershipTransferred(previousOwner, _newOwner);**
**### Summary
Both facet and library emit the
OwnershipTransferredevent before updating the stored owner variable. Emitting events after the state change is the conventional pattern and reduces cognitive load for auditors.Suggested change
Change ordering from:
to: