Skip to content

Commit

Permalink
refactor: Move lambda outside parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
sya-ri committed Jun 10, 2024
1 parent db80635 commit 85ca9ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/dev/s7a/ktconfig/KtConfigFile.kt
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ inline fun <reified T : Any> KtConfigFile(
file: File,
default: T,
): KtConfigFile.Default<T> {
return KtConfigFile(file, { default })
return KtConfigFile(file) { default }
}

/**
Expand Down Expand Up @@ -324,7 +324,7 @@ inline fun <reified T : Any> KtConfigFile(
path: String,
default: T,
): KtConfigFile.Default<T> {
return KtConfigFile(plugin, path, { default })
return KtConfigFile(plugin, path) { default }
}

/**
Expand Down Expand Up @@ -360,7 +360,7 @@ inline fun <reified T : Any> JavaPlugin.KtConfigFile(
path: String,
default: T,
): KtConfigFile.Default<T> {
return KtConfigFile(this, path, { default })
return KtConfigFile(this, path) { default }
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/dev/s7a/ktconfig/KtConfigString.kt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ inline fun <reified T : Any> KtConfigString(noinline default: () -> T): KtConfig
*/
@Suppress("FunctionName")
inline fun <reified T : Any> KtConfigString(default: T): KtConfigString.Default<T> {
return KtConfigString({ default })
return KtConfigString { default }
}

/**
Expand Down

0 comments on commit 85ca9ef

Please sign in to comment.