Skip to content

Commit 0968cbf

Browse files
committed
refactor: simplify equals implementation
1 parent ddfffe1 commit 0968cbf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/kotlin/com/coder/toolbox/CoderRemoteEnvironment.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,9 @@ class CoderRemoteEnvironment(
194194
*/
195195
override fun equals(other: Any?): Boolean {
196196
if (other == null) return false
197-
if (this === other) return true // Note the triple ===
197+
if (this === other) return true
198198
if (other !is CoderRemoteEnvironment) return false
199-
if (id != other.id) return false
200-
return true
199+
return id == other.id
201200
}
202201

203202
/**

0 commit comments

Comments
 (0)