Skip to content

Commit

Permalink
Fix IDE0250 (struct can be made readonly)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Jul 19, 2024
1 parent 3702982 commit df8f29e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void ICollection.CopyTo(Array array, int index)

object ICollection.SyncRoot => (m_dictionary is ICollection coll) ? coll.SyncRoot : this;

private struct DictionaryEnumerator : IDictionaryEnumerator
private readonly struct DictionaryEnumerator : IDictionaryEnumerator
{
private readonly IDictionary<TKey, TValue> _dictionary;
private readonly IEnumerator<KeyValuePair<TKey, TValue>> _enumerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal struct EventPipeSessionInfo
}

[StructLayout(LayoutKind.Sequential)]
internal struct EventPipeProviderConfiguration
internal readonly struct EventPipeProviderConfiguration
{
[MarshalAs(UnmanagedType.LPWStr)]
private readonly string m_providerName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public void EnterReadLock()
//
// Common timeout support
//
private struct TimeoutTracker
private readonly struct TimeoutTracker
{
private readonly int _total;
private readonly int _start;
Expand Down

0 comments on commit df8f29e

Please sign in to comment.