Skip to content

Commit 7bf2d3f

Browse files
authored
fix: Removed explicit cast for control invoking
Potential fix for code scanning alert no. 34: Cast to same type
2 parents 548782f + 05b1fba commit 7bf2d3f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/TypeGuard.Winforms/WinFormsInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class WinFormsInput(Control control) : IInputProvider
4242
public string? GetInput()
4343
{
4444
string? text = _control.InvokeRequired
45-
? (string?)_control.Invoke(() => _control.Text)
45+
? _control.Invoke(() => _control.Text)
4646
: _control.Text;
4747

4848
return string.IsNullOrEmpty(text) ? null : text.Trim();

0 commit comments

Comments
 (0)