Skip to content

Commit e7c1318

Browse files
committed
Fix warnings
1 parent c102588 commit e7c1318

File tree

4 files changed

+1
-9
lines changed

4 files changed

+1
-9
lines changed

core/build.gradle.kts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ kotlin {
130130
sourceSets.all {
131131
val suffixIndex = name.indexOfLast { it.isUpperCase() }
132132
val targetName = name.substring(0, suffixIndex)
133-
val suffix = name.substring(suffixIndex).toLowerCase().takeIf { it != "main" }
133+
val suffix = name.substring(suffixIndex).lowercase().takeIf { it != "main" }
134134
// println("SOURCE_SET: $name")
135135
kotlin.srcDir("$targetName/${suffix ?: "src"}")
136136
resources.srcDir("$targetName/${suffix?.let { it + "Resources" } ?: "resources"}")
@@ -344,14 +344,11 @@ val downloadWindowsZonesMapping by tasks.registering {
344344
PrintWriter(bos).use { out ->
345345
out.println("""// generated with gradle task `$name`""")
346346
out.println("""package kotlinx.datetime""")
347-
out.println("""import kotlin.native.concurrent.SharedImmutable""")
348-
out.println("""@SharedImmutable""")
349347
out.println("""internal val standardToWindows: Map<String, String> = mutableMapOf(""")
350348
for ((usualName, windowsName) in sortedMapping) {
351349
out.println(" \"$usualName\" to \"$windowsName\",")
352350
}
353351
out.println(")")
354-
out.println("""@SharedImmutable""")
355352
out.println("""internal val windowsToStandard: Map<String, String> = mutableMapOf(""")
356353
val reverseMap = sortedMapOf<String, String>()
357354
for ((usualName, windowsName) in mapping) {

core/linux/test/TimeZoneRulesCompleteTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ fun parseRfc2822(input: String): Pair<LocalDateTime, String> {
113113
val abbreviation = input.substringAfterLast(" ")
114114
val dateTime = input.substringBeforeLast(" ")
115115
val components = dateTime.split(Regex(" +"))
116-
val dayOfWeek = components[0]
117116
val month = components[1]
118117
val dayOfMonth = components[2].toInt()
119118
val time = LocalTime.parse(components[3])

core/windows/src/TimeZoneNative.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ internal actual class RegionTimeZone(private val tzid: TimeZoneRules, actual ove
5757
actual override fun offsetAtImpl(instant: Instant): UtcOffset = tzid.infoAtInstant(instant)
5858
}
5959

60-
@SharedImmutable
6160
private val tzdbInRegistry = TzdbInRegistry()
6261

6362
internal actual fun currentTime(): Instant = memScoped {

core/windows/src/WindowsZoneNames.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// generated with gradle task `downloadWindowsZonesMapping`
22
package kotlinx.datetime
3-
import kotlin.native.concurrent.SharedImmutable
4-
@SharedImmutable
53
internal val standardToWindows: Map<String, String> = mutableMapOf(
64
"Africa/Abidjan" to "Greenwich Standard Time",
75
"Africa/Accra" to "Greenwich Standard Time",
@@ -465,7 +463,6 @@ internal val standardToWindows: Map<String, String> = mutableMapOf(
465463
"Pacific/Wallis" to "UTC+12",
466464
"UTC" to "UTC",
467465
)
468-
@SharedImmutable
469466
internal val windowsToStandard: Map<String, String> = mutableMapOf(
470467
"AUS Central Standard Time" to "Australia/Darwin",
471468
"AUS Eastern Standard Time" to "Australia/Sydney",

0 commit comments

Comments
 (0)