Skip to content

Commit

Permalink
Fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarfgp committed May 15, 2024
1 parent 34f95f0 commit 88b37c9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Fabulous/Builders.fs
Original file line number Diff line number Diff line change
Expand Up @@ -132,29 +132,29 @@ type CollectionBuilder<'msg, 'marker, 'itemMarker> =
{ WidgetKey = widgetKey
Attr = attr
Attributes = attributes }

new(widgetKey: WidgetKey, attr: WidgetCollectionAttributeDefinition, scalars: StackList<ScalarAttribute>) =
{ WidgetKey = widgetKey
Attr = attr
Attributes = AttributesBundle(scalars, ValueNone, ValueNone) }

new(widgetKey: WidgetKey, attr: WidgetCollectionAttributeDefinition) =
{ WidgetKey = widgetKey
Scalars = AttributesBundle(StackList.empty(), ValueNone, ValueNone)
Attributes = AttributesBundle(StackList.empty(), ValueNone, ValueNone)
Attr = attr }

new(widgetKey: WidgetKey, attr: WidgetCollectionAttributeDefinition, scalar: ScalarAttribute) =
{ WidgetKey = widgetKey
Scalars = AttributesBundle(StackList.one scalar, ValueNone, ValueNone)
Attributes = AttributesBundle(StackList.one scalar, ValueNone, ValueNone)
Attr = attr }

new(widgetKey: WidgetKey, attr: WidgetCollectionAttributeDefinition, scalarA: ScalarAttribute, scalarB: ScalarAttribute) =
{ WidgetKey = widgetKey
Scalars = AttributesBundle(StackList.two(scalarA, scalarB), ValueNone, ValueNone)
Attributes = AttributesBundle(StackList.two(scalarA, scalarB), ValueNone, ValueNone)
Attr = attr }

member inline x.Run(c: Content<'msg>) =
let struct (scalars, widgets, widgetCollections) = x.Scalars
let struct (scalars, widgets, widgetCollections) = x.Attributes

let attrValue =
match MutStackArray1.toArraySlice &c.Widgets with
Expand Down Expand Up @@ -192,7 +192,7 @@ type CollectionBuilder<'msg, 'marker, 'itemMarker> =
[<EditorBrowsable(EditorBrowsableState.Never)>]
member inline x.AddScalar(attr: ScalarAttribute) =
let struct (scalarAttributes, widgetAttributes, widgetCollectionAttributes) =
x.Scalars
x.Attributes

CollectionBuilder<'msg, 'marker, 'itemMarker>(
x.WidgetKey,
Expand Down

0 comments on commit 88b37c9

Please sign in to comment.