Skip to content

Commit f9f864e

Browse files
committed
Fix build warning
1 parent e187fa6 commit f9f864e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

FollowingFileStream/FollowingFileStream.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,7 @@ private bool IsFileLockedForWriting()
442442
{
443443
try
444444
{
445-
using (new FileStream(this.fileStream.Name, FileMode.Open, FileAccess.Write, FileShare.Read))
446-
{
447-
}
445+
using var stream = new FileStream(this.fileStream.Name, FileMode.Open, FileAccess.Write, FileShare.Read);
448446
}
449447
catch (IOException)
450448
{

0 commit comments

Comments
 (0)