-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redefine Duration as readonly struct to prevent defensive copies (#9769)
* Convert Duration struct to readonly struct as it is immutable * Simplify Equals override * Simplify GetHashCode * Use nameof(timeSpan) in throw methods * Simplify TimeSpan property and remove unnecessary warning suppressions --------- Co-authored-by: Dipesh Kumar <[email protected]>
- Loading branch information
1 parent
075afff
commit 3ce8132
Showing
2 changed files
with
29 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters