Fix attribute serialization tests

This commit is contained in:
Alexander Nozik 2023-02-12 12:49:55 +03:00
parent e80c9406c9
commit e7784c2960

View File

@ -19,6 +19,8 @@ public value class Attributes internal constructor(public val content: Map<out A
}
}
public fun Attributes.isEmpty(): Boolean = content.isEmpty()
public fun <T> Attributes.getOrDefault(attribute: AttributeWithDefault<T>): T = get(attribute) ?: attribute.default
public fun <T, A : Attribute<T>> Attributes.withAttribute(