From 9cdb5e0dbf5ecc75d75a3de96c924f55e92b1323 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sun, 20 Oct 2024 13:31:41 +0200 Subject: [PATCH] replace Span with ReadOnlySpan where appropriate --- crates/servicepoint_binding_cs/ServicePoint/BitVec.cs | 2 +- crates/servicepoint_binding_cs/ServicePoint/Bitmap.cs | 2 +- crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.cs | 2 +- crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.cs | 2 +- crates/servicepoint_binding_cs/ServicePoint/Packet.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/servicepoint_binding_cs/ServicePoint/BitVec.cs b/crates/servicepoint_binding_cs/ServicePoint/BitVec.cs index 9afdb28..fe01947 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/BitVec.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/BitVec.cs @@ -2,7 +2,7 @@ namespace ServicePoint; public sealed partial class BitVec { - public static BitVec Load(Span bytes) + public static BitVec Load(ReadOnlySpan bytes) { unsafe { diff --git a/crates/servicepoint_binding_cs/ServicePoint/Bitmap.cs b/crates/servicepoint_binding_cs/ServicePoint/Bitmap.cs index 07f63d8..72e1152 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Bitmap.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Bitmap.cs @@ -2,7 +2,7 @@ namespace ServicePoint; public sealed partial class Bitmap { - public static Bitmap Load(nuint width, nuint height, Span bytes) + public static Bitmap Load(nuint width, nuint height, ReadOnlySpan bytes) { unsafe { diff --git a/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.cs b/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.cs index fdca652..15eb20a 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/BrightnessGrid.cs @@ -2,7 +2,7 @@ namespace ServicePoint; public sealed partial class BrightnessGrid { - public static BrightnessGrid Load(nuint width, nuint height, Span bytes) + public static BrightnessGrid Load(nuint width, nuint height, ReadOnlySpan bytes) { unsafe { diff --git a/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.cs b/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.cs index 16a70e2..f86e470 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Cp437Grid.cs @@ -4,7 +4,7 @@ namespace ServicePoint; public sealed partial class Cp437Grid { - public static Cp437Grid Load(nuint width, nuint height, Span bytes) + public static Cp437Grid Load(nuint width, nuint height, ReadOnlySpan bytes) { unsafe { diff --git a/crates/servicepoint_binding_cs/ServicePoint/Packet.cs b/crates/servicepoint_binding_cs/ServicePoint/Packet.cs index 7946921..c885853 100644 --- a/crates/servicepoint_binding_cs/ServicePoint/Packet.cs +++ b/crates/servicepoint_binding_cs/ServicePoint/Packet.cs @@ -4,7 +4,7 @@ namespace ServicePoint; public sealed partial class Packet { - public static bool TryLoad(Span bytes, [MaybeNullWhen(false)] out Packet packet) + public static bool TryLoad(ReadOnlySpan bytes, [MaybeNullWhen(false)] out Packet packet) { unsafe {