From 02e1b0309ccb881fedc7a0d9e7b19d81ad68e28a Mon Sep 17 00:00:00 2001 From: sakno Date: Sun, 25 Feb 2024 18:47:08 +0200 Subject: [PATCH] Cleanup reader correctly --- src/DotNext.Tests/IO/StreamSegmentTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DotNext.Tests/IO/StreamSegmentTests.cs b/src/DotNext.Tests/IO/StreamSegmentTests.cs index be381c960..dfd908120 100644 --- a/src/DotNext.Tests/IO/StreamSegmentTests.cs +++ b/src/DotNext.Tests/IO/StreamSegmentTests.cs @@ -13,7 +13,7 @@ public static void AdjustSetsSegmentOfStream(int offset, int length, string expe using var ms = new MemoryStream(Encoding.UTF8.GetBytes("This is a test")); using var segment = new StreamSegment(ms); segment.Adjust(offset, length); - StreamReader reader = new(segment); + using StreamReader reader = new(segment); Equal(expected, reader.ReadToEnd()); }