Skip to content

Commit

Permalink
Don't use dummyDisposable
Browse files Browse the repository at this point in the history
  • Loading branch information
safesparrow committed Oct 10, 2022
1 parent 6684413 commit 549b3f8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Compiler/Facilities/Activity.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ open System.Diagnostics
[<RequireQualifiedAccess>]
module Activity =

let private dummyDisposable =
{
new IDisposable with
member this.Dispose() = ()
}

let private activitySourceName = "fsc"
let private activitySource = new ActivitySource(activitySourceName)

Expand All @@ -24,6 +18,6 @@ module Activity =
activity.AddTag(key, value) |> ignore
activity :> IDisposable
| None ->
dummyDisposable
null

let startNoTags name: IDisposable = activitySource.StartActivity(name)

0 comments on commit 549b3f8

Please sign in to comment.