Skip to content

Commit fe82533

Browse files
committed
remove unnecessary calls to Close() in using() statement
1 parent b4c1f2b commit fe82533

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Packages/com.unity.formats.fbx/Editor/Scripts/FbxExporterRepairMissingScripts.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,13 @@ private static bool AssetNeedsRepair(string filePath)
9595
if(sr.Peek() > -1){
9696
var firstLine = sr.ReadLine();
9797
if(!firstLine.StartsWith("%YAML")){
98-
sr.Close();
9998
return false;
10099
}
101100
}
102101

103102
var contents = sr.ReadToEnd();
104103
if (SearchIDsToReplace.Exists(searchId => contents.Contains(searchId)))
105104
{
106-
sr.Close();
107105
return true;
108106
}
109107
}
@@ -158,7 +156,6 @@ private static bool ReplaceGUIDInFile (string path, string replacementSearchID)
158156
if (sr.Peek () > -1) {
159157
firstLine = sr.ReadLine ();
160158
if (!firstLine.StartsWith ("%YAML")) {
161-
sr.Close ();
162159
return false;
163160
}
164161
}

0 commit comments

Comments
 (0)