Skip to content

Commit a2c49e8

Browse files
authored
Merge pull request #65 from kkebo/revert-revert-inline-array-type-sugar
2 parents 9bf9dd8 + f51ea66 commit a2c49e8

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v4
2121
- run: swift --version
22-
- run: swift format lint -rp .
22+
- run: swift format lint --enable-experimental-feature InlineArrayTypeSugar -rp .
2323
yamllint:
2424
runs-on: ubuntu-latest
2525
container: alpine:3.21

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,11 @@ run: all
3232
clean:
3333
$(RM) $(EXE) $(IMG) $(MAP)
3434
$(SWIFT) package clean
35+
36+
.PHONY: lint
37+
lint:
38+
$(SWIFT) format lint --enable-experimental-feature InlineArrayTypeSugar -rp .
39+
40+
.PHONY: fmt
41+
fmt:
42+
$(SWIFT) format format --enable-experimental-feature InlineArrayTypeSugar -rip .

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import PackageDescription
55
let swiftSettings: [SwiftSetting] = [
66
.enableExperimentalFeature("Embedded"),
77
.enableExperimentalFeature("LifetimeDependence"),
8+
.enableExperimentalFeature("InlineArrayTypeSugar"),
89
.unsafeFlags(["-Xfrontend", "-no-allocations"]),
910
.unsafeFlags(["-Xfrontend", "-function-sections"]),
1011
.unsafeFlags(["-Xfrontend", "-disable-stack-protector"]),

Sources/Font/font.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package let fontWidth = 8
22
package let fontHeight = 8
33

4-
package let font: InlineArray<224, InlineArray<8, UInt8>> = [
4+
// swift-format-ignore
5+
package let font: [224 x [8 x UInt8]] = [
56
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // U+0000 (nul)
67
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // U+0001
78
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // U+0002

0 commit comments

Comments
 (0)