Skip to content

Commit

Permalink
Fix contracts of isNot functions
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Jul 10, 2022
1 parent feaba2a commit 31fdf3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {


allprojects {
version = "1.2.0"
version = "1.2.1"
group = "dev.schlaubi"
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public inline fun <C : CharSequence> C.nullIfBlank(): C? = ifBlank { null }
*/
public inline fun CharSequence?.isNotNullOrEmpty(): Boolean {
contract {
returns(false) implies (this@isNotNullOrEmpty != null)
returns(true) implies (this@isNotNullOrEmpty != null)
}

return !isNullOrEmpty()
Expand All @@ -52,7 +52,7 @@ public inline fun CharSequence?.isNotNullOrEmpty(): Boolean {
*/
public inline fun CharSequence?.isNotNullOrBlank(): Boolean {
contract {
returns(false) implies (this@isNotNullOrBlank != null)
returns(true) implies (this@isNotNullOrBlank != null)
}

return !isNullOrBlank()
Expand Down

0 comments on commit 31fdf3e

Please sign in to comment.