Skip to content

Commit 33ad120

Browse files
authored
Merge pull request #1090 from kerams/ff
Remove match struct
2 parents 8bd2605 + 249ae69 commit 33ad120

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/Fabulous/Array.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module ArraySlice =
4949
module Array =
5050
let inline appendOne (v: 'v) (arr: 'v array) =
5151
let res = Array.zeroCreate(arr.Length + 1)
52-
res[..arr.Length - 1] <- arr
52+
res[.. arr.Length - 1] <- arr
5353
res[arr.Length] <- v
5454
res
5555

src/Fabulous/Components/Component.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,28 @@ type Component
4141
ValueSome(filteredAttrs) // skip the component data
4242

4343
let scalars =
44-
match struct (rootWidget.ScalarAttributes, componentScalars) with
44+
match rootWidget.ScalarAttributes, componentScalars with
4545
| ValueNone, ValueNone -> ValueNone
4646
| ValueSome attrs, ValueNone
4747
| ValueNone, ValueSome attrs -> ValueSome attrs
4848
| ValueSome widgetAttrs, ValueSome componentAttrs -> ValueSome(Array.append componentAttrs widgetAttrs)
4949

5050
let widgets =
51-
match struct (rootWidget.WidgetAttributes, componentWidget.WidgetAttributes) with
51+
match rootWidget.WidgetAttributes, componentWidget.WidgetAttributes with
5252
| ValueNone, ValueNone -> ValueNone
5353
| ValueSome attrs, ValueNone
5454
| ValueNone, ValueSome attrs -> ValueSome attrs
5555
| ValueSome widgetAttrs, ValueSome componentAttrs -> ValueSome(Array.append componentAttrs widgetAttrs)
5656

5757
let widgetColls =
58-
match struct (rootWidget.WidgetCollectionAttributes, componentWidget.WidgetCollectionAttributes) with
58+
match rootWidget.WidgetCollectionAttributes, componentWidget.WidgetCollectionAttributes with
5959
| ValueNone, ValueNone -> ValueNone
6060
| ValueSome attrs, ValueNone
6161
| ValueNone, ValueSome attrs -> ValueSome attrs
6262
| ValueSome widgetAttrs, ValueSome componentAttrs -> ValueSome(Array.append componentAttrs widgetAttrs)
6363

6464
let environments =
65-
match struct (rootWidget.EnvironmentAttributes, componentWidget.EnvironmentAttributes) with
65+
match rootWidget.EnvironmentAttributes, componentWidget.EnvironmentAttributes with
6666
| ValueNone, ValueNone -> ValueNone
6767
| ValueSome attrs, ValueNone
6868
| ValueNone, ValueSome attrs -> ValueSome attrs

src/Fabulous/Components/ComponentContext.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type ComponentContext(initialSize: int) =
4848
if values.Length < count then
4949
let newLength = max (values.Length * 2) count
5050
let newArray = Array.zeroCreate newLength
51-
newArray[..values.Length - 1] <- values
51+
newArray[.. values.Length - 1] <- values
5252
values <- newArray
5353

5454
member this.TryGetValue<'T>(key: int) =

0 commit comments

Comments
 (0)