Skip to content

Commit

Permalink
♻️ AddImageAsync should use a ReadOnlyMemory.
Browse files Browse the repository at this point in the history
  • Loading branch information
hexawyz committed Jan 18, 2025
1 parent e66649c commit 971faac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Exo/Service/Exo.Service.Core/ImageStorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public async IAsyncEnumerable<ImageChangeNotification> WatchChangesAsync([Enumer
}
}

public async ValueTask AddImageAsync(string imageName, Memory<byte> data, CancellationToken cancellationToken)
public async ValueTask AddImageAsync(string imageName, ReadOnlyMemory<byte> data, CancellationToken cancellationToken)
{
if (!ImageNameSerializer.IsNameValid(imageName)) throw new ArgumentException("Invalid name.");
using (await _lock.WaitAsync(cancellationToken).ConfigureAwait(false))
Expand Down

0 comments on commit 971faac

Please sign in to comment.