8000 Apply suggestions from code review · awakecoding/PowerShell@ad8d13b · GitHub
[go: up one dir, main page]

Skip to content

Commit ad8d13b

Browse files
jborean93iSazonov
authored andcommitted
Apply suggestions from code review
Co-authored-by: Ilya <darpa@yandex.ru>
1 parent 82341b0 commit ad8d13b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,12 +630,11 @@ public void PushRunspace(Runspace runspace)
630630
}
631631

632632
RemoteRunspace remoteRunspace = runspace as RemoteRunspace;
633-
if (remoteRunspace is null)
633+
if (remoteRunspace is not RemoteRunspace remoteRunspace)
634634
{
635635
throw new ArgumentException(ConsoleHostStrings.PushRunspaceNotRemote, nameof(runspace));
636636
}
637637

638-
Dbg.Assert(remoteRunspace != null, "Expected remoteRunspace != null");
639638
remoteRunspace.StateChanged += HandleRemoteRunspaceStateChanged;
640639

641640
// Unsubscribe the local session debugger.

0 commit comments

Comments
 (0)
0