Skip to content

Commit 4520ba7

Browse files
VladimirMakaevfacebook-github-bot
authored andcommitted
Update ktfmt component on FBS:master
Reviewed By: zertosh, hick209 Differential Revision: D62005865 fbshipit-source-id: 48534bd6fdff412e221a009c95fba754ed15cfc7
1 parent ad5361f commit 4520ba7

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

litho-core/src/main/java/com/facebook/litho/KCached.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ fun <T> ComponentScope.useCached(vararg inputs: Any?, calculator: () -> T): T {
3333
context.getCachedValue(globalKey, hookIndex, cacheInputs)
3434
?: calculator().also { context.putCachedValue(globalKey, hookIndex, cacheInputs, it) }
3535

36-
@Suppress("UNCHECKED_CAST") return result as T
36+
@Suppress("UNCHECKED_CAST")
37+
return result as T
3738
}
3839

3940
/**

litho-core/src/main/java/com/facebook/litho/KEventHandler.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ internal class KEventHandler<E : Any, R>(
8080
}
8181

8282
override fun dispatchOnEvent(eventHandler: EventHandler<*>, eventState: Any): R {
83-
@Suppress("UNCHECKED_CAST") return onEvent(eventState as E)
83+
@Suppress("UNCHECKED_CAST")
84+
return onEvent(eventState as E)
8485
}
8586

8687
override fun getEventDispatcher(): EventDispatcher {

litho-rendercore/src/main/java/com/facebook/rendercore/LayoutCache.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class LayoutCache(oldWriteCache: Map<Any, Any?>? = null) {
3535
}
3636

3737
operator fun <T> get(uniqueId: Any): T? {
38-
@Suppress("UNCHECKED_CAST") return readCache.get(uniqueId) as? T?
38+
@Suppress("UNCHECKED_CAST")
39+
return readCache.get(uniqueId) as? T?
3940
}
4041

4142
val writeCacheData: Map<Any, Any?>

sample/src/main/java/com/facebook/samples/litho/kotlin/gettingstarted/ClickableText.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ import com.facebook.samples.litho.R
3535
* Text component which will display a greeting with the given name.
3636
*
3737
* @param name the name to display in the greeting message
38-
* @constructor Instantiates a new BootcampText component
3938
* @property name the name that will be displayed in the greeting message
39+
* @constructor Instantiates a new BootcampText component
4040
*/
4141
class ClickableText(private val name: String) : KComponent() {
4242
override fun ComponentScope.render(): Component {

0 commit comments

Comments
 (0)