Skip to content

Commit 0757a99

Browse files
committed
PR feedback: reuse DirectoryInfo instance
1 parent 9a43f9d commit 0757a99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/FSharpLint.Client/LSPFSharpLintServiceTypes.fs

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ with
2020
static member from (filePath: string) =
2121
if File.Exists(filePath) then
2222
// Path.GetFullPath to resolve path like /foo/bar/../baz
23-
let folder = ((filePath |> Path.GetFullPath |> FileInfo).Directory).FullName
24-
if DirectoryInfo(folder).Exists then
25-
folder |> Folder |> Some
23+
let folder = ((filePath |> Path.GetFullPath |> FileInfo).Directory)
24+
if folder.Exists then
25+
folder.FullName |> Folder |> Some
2626
else
2727
None
2828
else

0 commit comments

Comments
 (0)