From 0010257765894360367d626306d2e059491d381e Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Thu, 8 Aug 2024 11:17:01 +1200 Subject: [PATCH] Update swiftlint (#55) * fix lint * update swiftlint action * fix arg --- .github/workflows/ci.yml | 4 ++-- Database/Sources/Database/RocksDB.swift | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a90c83a3..e34bdd9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Check swift codestyle - uses: norio-nomura/action-swiftlint@3.2.1 + uses: cirruslabs/swiftlint-action@v1 with: - args: lint --config .swiftlint.yml --strict + args: --config .swiftlint.yml --strict test: name: Build and Test diff --git a/Database/Sources/Database/RocksDB.swift b/Database/Sources/Database/RocksDB.swift index 19e9a33d..51d1c9f5 100644 --- a/Database/Sources/Database/RocksDB.swift +++ b/Database/Sources/Database/RocksDB.swift @@ -77,8 +77,7 @@ extension RocksDB { } let rest = data.dropFirst() let first = data.first! - return first.withUnsafeBytes { - (bufferPtr: UnsafeRawBufferPointer) -> Result in + return first.withUnsafeBytes { (bufferPtr: UnsafeRawBufferPointer) -> Result in guard let bufferAddress = bufferPtr.baseAddress else { return .failure(.noData) }