Minor, remove unnecessary NOTHING_TO_INLINE suppressions
This commit is contained in:
@@ -35,38 +35,32 @@ public fun <T: Any> T?.singletonOrEmptyList(): List<T> = if (this != null) Colle
|
||||
|
||||
public fun <T: Any> T?.singletonOrEmptySet(): Set<T> = if (this != null) Collections.singleton(this) else Collections.emptySet()
|
||||
|
||||
[suppress("NOTHING_TO_INLINE")]
|
||||
public inline fun <reified T : Any> Stream<*>.firstIsInstanceOrNull(): T? {
|
||||
for (element in this) if (element is T) return element
|
||||
return null
|
||||
}
|
||||
|
||||
[suppress("NOTHING_TO_INLINE")]
|
||||
public inline fun <reified T : Any> Iterable<*>.firstIsInstanceOrNull(): T? {
|
||||
for (element in this) if (element is T) return element
|
||||
return null
|
||||
}
|
||||
|
||||
[suppress("NOTHING_TO_INLINE")]
|
||||
public inline fun <reified T : Any> Array<*>.firstIsInstanceOrNull(): T? {
|
||||
for (element in this) if (element is T) return element
|
||||
return null
|
||||
}
|
||||
|
||||
[suppress("NOTHING_TO_INLINE")]
|
||||
public inline fun <reified T> Stream<*>.firstIsInstance(): T {
|
||||
for (element in this) if (element is T) return element
|
||||
throw NoSuchElementException("No element of given type found")
|
||||
}
|
||||
|
||||
[suppress("NOTHING_TO_INLINE")]
|
||||
public inline fun <reified T> Iterable<*>.firstIsInstance(): T {
|
||||
for (element in this) if (element is T) return element
|
||||
throw NoSuchElementException("No element of given type found")
|
||||
}
|
||||
|
||||
[suppress("NOTHING_TO_INLINE")]
|
||||
public inline fun <reified T> Array<*>.firstIsInstance(): T {
|
||||
for (element in this) if (element is T) return element
|
||||
throw NoSuchElementException("No element of given type found")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,6 @@ public class DescriptorKindFilter(
|
||||
.filterNotNull()
|
||||
.toReadOnlyList()
|
||||
|
||||
[suppress("NOTHING_TO_INLINE")]
|
||||
private inline fun <reified T> staticFields() = javaClass<T>().getFields().filter { Modifier.isStatic(it.getModifiers()) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user