Skip to content

Commit 20717e2

Browse files
committed
Use readonly struct.
1 parent 315cf5d commit 20717e2

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/MySqlConnector/Protocol/PayloadData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace MySqlConnector.Protocol
55
{
6-
internal struct PayloadData : IDisposable
6+
internal readonly struct PayloadData : IDisposable
77
{
88
public PayloadData(byte[] data, bool isPooled = false)
99
{

src/MySqlConnector/Protocol/Serialization/Packet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MySqlConnector.Protocol.Serialization
44
{
5-
internal struct Packet
5+
internal readonly struct Packet
66
{
77
public Packet(ArraySegment<byte> contents)
88
{

src/MySqlConnector/Utilities/ResizableArraySegment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace MySqlConnector.Utilities
55
/// <summary>
66
/// An <see cref="ArraySegment{T}"/> that supports having its underlying array reallocated and resized.
77
/// </summary>
8-
internal struct ResizableArraySegment<T>
8+
internal readonly struct ResizableArraySegment<T>
99
{
1010
public ResizableArraySegment(ResizableArray<T> array, int offset, int count)
1111
{

src/MySqlConnector/Utilities/TimerQueue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private void UnsafeClearTimer()
108108
m_timer.Change(-1, -1);
109109
}
110110

111-
private struct Data
111+
private readonly struct Data
112112
{
113113
public Data(uint id, int time, Action action)
114114
{

0 commit comments

Comments
 (0)