Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit d52f0f6

Browse files
Removing a bunch of redundant casts
1 parent 002ca60 commit d52f0f6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/GitHub.Api/Installer/GitInstaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public bool IsGitLfsExtracted()
9696
return false;
9797
}
9898

99-
var calculateMd5 = (string)environment.FileSystem.CalculateFileMD5((string)GitLfsExecutablePath);
99+
var calculateMd5 = environment.FileSystem.CalculateFileMD5(GitLfsExecutablePath);
100100
logger.Trace("GitLFS MD5: {0}", calculateMd5);
101101
var md5 = environment.IsWindows ? WindowsGitLfsExecutableMD5 : MacGitLfsExecutableMD5;
102102
if (String.Compare(calculateMd5, md5, true) != 0)

src/tests/IntegrationTests/Git/GitSetupTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public async Task InstallGit()
4141
gitLfsDestinationPath = gitLfsDestinationPath.Combine("libexec", "git-core", "git-lfs.exe");
4242
gitLfsDestinationPath.FileExists().Should().BeTrue();
4343

44-
var calculateMd5 = (string)NPath.FileSystem.CalculateFileMD5((string)gitLfsDestinationPath);
44+
var calculateMd5 = NPath.FileSystem.CalculateFileMD5(gitLfsDestinationPath);
4545
Assert.IsTrue(string.Compare(calculateMd5, GitInstaller.WindowsGitLfsExecutableMD5, true) == 0);
4646

4747
setupDone = await gitSetup.SetupIfNeeded(new Progress<float>(x => percent = x));
@@ -83,7 +83,7 @@ public void VerifyWindowsGitLfsBundle()
8383

8484
gitLfsPath.Exists().Should().BeTrue();
8585

86-
var calculateMd5 = (string)NPath.FileSystem.CalculateFileMD5((string)gitLfsPath);
86+
var calculateMd5 = NPath.FileSystem.CalculateFileMD5(gitLfsPath);
8787
calculateMd5.ToLower().Should().Be(GitInstaller.WindowsGitLfsExecutableMD5.ToLower());
8888
}
8989

@@ -103,7 +103,7 @@ public void VerifyMacGitLfsBundle()
103103

104104
gitLfsPath.Exists().Should().BeTrue();
105105

106-
var calculateMd5 = (string)NPath.FileSystem.CalculateFileMD5((string)gitLfsPath);
106+
var calculateMd5 = NPath.FileSystem.CalculateFileMD5(gitLfsPath);
107107
calculateMd5.ToLower().Should().Be(GitInstaller.MacGitLfsExecutableMD5.ToLower());
108108
}
109109
}

0 commit comments

Comments
 (0)