Skip to content

Commit

Permalink
Fix error in PerformanceSnippets.kt (#122)
Browse files Browse the repository at this point in the history
* Fix error in PerformanceSnippets.kt

sortComparator should be comparator

* Remove unused code
  • Loading branch information
bentrengrove authored and secondsun committed Jul 20, 2023
1 parent 37bac36 commit 3998e98
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ private object ContactsListGoodSort {
comparator: Comparator<Contact>,
modifier: Modifier = Modifier
) {
val sortedContacts = remember(contacts, sortComparator) {
contacts.sortedWith(sortComparator)
val sortedContacts = remember(contacts, comparator) {
contacts.sortedWith(comparator)
}

LazyColumn(modifier) {
Expand Down Expand Up @@ -287,8 +287,6 @@ private data class Contact(val name: String) : Comparable<Contact> {
}
}

private val sortComparator = naturalOrder<Contact>()

class Note {
val id: Int = 0
}
Expand Down

0 comments on commit 3998e98

Please sign in to comment.