Android: loneUrl trims without a spread
detekt's SpreadOperator flagged trimEnd(*TRAILING_PUNCTUATION) from
1c4bf56. trimEnd { it in TRAILING_PUNCTUATION } trims the same characters
without copying the array. Checked with detekt in the CI image.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -57,7 +57,7 @@ fun loneUrl(body: String): String? =
|
|||||||
.matchEntire(body)
|
.matchEntire(body)
|
||||||
?.groupValues
|
?.groupValues
|
||||||
?.get(1)
|
?.get(1)
|
||||||
?.trimEnd(*TRAILING_PUNCTUATION)
|
?.trimEnd { it in TRAILING_PUNCTUATION }
|
||||||
?.ifEmpty { null }
|
?.ifEmpty { null }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user