Skip to content

Commit fc5503a

Browse files
committed
[Modify] Polish it
1 parent b098a67 commit fc5503a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

websocket-sharp/WebSocket.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,16 +1054,17 @@ private static bool checkProtocols (string[] protocols, out string message)
10541054
{
10551055
message = null;
10561056

1057-
Func<string, bool> cond = protocol => protocol.IsNullOrEmpty ()
1058-
|| !protocol.IsToken ();
1057+
Func<string, bool> cond = p => p.IsNullOrEmpty () || !p.IsToken ();
10591058

10601059
if (protocols.Contains (cond)) {
10611060
message = "It contains a value that is not a token.";
1061+
10621062
return false;
10631063
}
10641064

10651065
if (protocols.ContainsTwice ()) {
10661066
message = "It contains a value twice.";
1067+
10671068
return false;
10681069
}
10691070

0 commit comments

Comments
 (0)