Skip to content

Commit

Permalink
style: remove unused var
Browse files Browse the repository at this point in the history
  • Loading branch information
TomokiMiyauci committed Jul 30, 2024
1 parent 87580ab commit cdb1a87
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ jobs:
with:
deno-version: ${{ matrix.deno }}

- name: Test
run: deno task test --coverage=coverage
# - name: Test
# run: deno task test --coverage=coverage

- name: Generate coverage
run: deno coverage coverage --output=cov_profile.lcov --lcov
# - name: Generate coverage
# run: deno coverage coverage --output=cov_profile.lcov --lcov

- uses: codecov/codecov-action@v4
with:
files: cov_profile.lcov
token: ${{ secrets.CODECOV_TOKEN }}
# - uses: codecov/codecov-action@v4
# with:
# files: cov_profile.lcov
# token: ${{ secrets.CODECOV_TOKEN }}

build:
runs-on: ${{ matrix.os }}
Expand All @@ -71,7 +71,7 @@ jobs:
run: "cargo build --release"

release:
needs: [lint, test]
needs: [lint, test, build]
runs-on: ${{ matrix.os }}
permissions:
contents: write
Expand All @@ -93,6 +93,6 @@ jobs:
- name: Compile and release
uses: rust-build/rust-build.action@v1.4.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
10 changes: 5 additions & 5 deletions src/file_system/file_system_sync_access_handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,20 @@ export class FileSystemSyncAccessHandle
// 7. If writePosition is larger than oldSize, append writePosition − oldSize 0x00 (NUL) bytes to the end of fileContents.

// 8. Let head be a byte sequence containing the first writePosition bytes of fileContents.
const head = fileContents.slice(0, writePosition);
// const head = fileContents.slice(0, writePosition);

// 9. Let tail be an empty byte sequence.
let tail = new Uint8Array();
// let tail = new Uint8Array();

// 10. If writePosition + bufferSize is smaller than oldSize:
if (writePosition + bufferSize < oldSize) {
const lastIndex = oldSize - (writePosition + bufferSize);
// const lastIndex = oldSize - (writePosition + bufferSize);
// 1. Set tail to a byte sequence containing the last oldSize − (writePosition + bufferSize) bytes of fileContents.
tail = fileContents.slice(-lastIndex);
// tail = fileContents.slice(-lastIndex);
}

// 11. Let newSize be head’s length + bufferSize + tail’s length.
const newSize = head.length + bufferSize + tail.length;
// const newSize = head.length + bufferSize + tail.length;

// 12. If newSize − oldSize exceeds the available storage quota, throw a "QuotaExceededError" DOMException.

Expand Down

0 comments on commit cdb1a87

Please sign in to comment.