Skip to content

Commit

Permalink
Fix trivial some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Paleologue committed Jul 20, 2021
1 parent e0bd0b0 commit c450742
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ open class Expression(val word: String = "", vararg val args: Expression) : Logi
}

override fun hashCode(): Int {
return word.hashCode() + args.sumBy { it.hashCode() }
return word.hashCode() + args.sumOf { it.hashCode() }
}

override fun toString(): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class MutableIndex<T>(private val nameOf: (T) -> String) : Index<T> {
override val size: Int get() = data.size
override val values: Collection<T> = data.values
override fun containsKey(key: String): Boolean = data.containsKey(key)
override fun containsValue(value: T): Boolean = data.containsValue(value)
override fun containsValue(value: T): Boolean = data.any { it.value == value }
override fun get(key: String): T? = data[key]
override fun isEmpty(): Boolean = data.isEmpty()

Expand Down

0 comments on commit c450742

Please sign in to comment.