commit 83e28d36b4f12c23a9460b3cb3858c82be7536de
parent 7cfc353c2aa44951f283a708b0d68092d11b6765
Author: minerva-jupiter <ryouturn@gmail.com>
Date: Sun, 12 Jul 2026 10:44:27 +0900
chore: update GitHub Actions and remove unused code comments
- Update actions/checkout to use the main branch
- Update softprops/action-gh-release to use the master branch
- Remove stale code comments in src/buffer.rs and src/main.rs
Diffstat:
4 files changed, 130 insertions(+), 136 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
@@ -1,87 +1,86 @@
-
-name: Release
-
-permissions:
- contents: write
-
-on:
- push:
- tags:
- - v*
-
-env:
- CARGO_TERM_COLOR: always
-
-jobs:
- Test:
- uses: ./.github/workflows/testing.yml
-
- build:
- needs: [Test]
- runs-on: ${{ matrix.runner }}
- env:
- PROJECT_NAME: image-light-freq-conv
- strategy:
- fail-fast: false
- matrix:
- include:
- - target: x86_64-unknown-linux-gnu
- extension: ""
- runner: ubuntu-latest
- cross: true
- - target: x86_64-pc-windows-msvc
- extension: ".exe"
- runner: windows-latest
- cross: false
- - target: aarch64-unknown-linux-gnu
- extension: ""
- runner: ubuntu-latest
- cross: true
- - target: aarch64-pc-windows-msvc
- extension: ".exe"
- runner: windows-latest
- cross: false
- - target: armv7-unknown-linux-gnueabihf
- extension: ""
- runner: ubuntu-latest
- cross: true
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Install Dependencies on Windows
- if: ${{ matrix.runner == 'windows-latest' }}
- run: |
- choco install make --yes
- - name: Install Dependencies on MacOS
- if: ${{ matrix.runner == 'macos-latest' }}
- run: |
- brew install make
-
- - name: Install cross (if needed)
- if: ${{ matrix.cross }}
- run: cargo install cross --git https://github.com/cross-rs/cross
-
- - name: Build Project on cross
- if: ${{ matrix.cross }}
- run: |
- cross build --release --target ${{ matrix.target }} --verbose
- - name: Build Project
- if: ${{ !matrix.cross }}
- run: |
- rustup target add ${{ matrix.target }}
- cargo build --release --target ${{ matrix.target }} --verbose
-
- - name: Rename Artifacts
- shell: bash
- run: |
- mv target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}{,-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }}}
-
- - name: Release Artifacts
- uses: softprops/action-gh-release@v2
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- files: |
- target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }}
+name: Release
+
+permissions:
+ contents: write
+
+on:
+ push:
+ tags:
+ - v*
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ Test:
+ uses: ./.github/workflows/testing.yml
+
+ build:
+ needs: [Test]
+ runs-on: ${{ matrix.runner }}
+ env:
+ PROJECT_NAME: image-light-freq-conv
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - target: x86_64-unknown-linux-gnu
+ extension: ""
+ runner: ubuntu-latest
+ cross: true
+ - target: x86_64-pc-windows-msvc
+ extension: ".exe"
+ runner: windows-latest
+ cross: false
+ - target: aarch64-unknown-linux-gnu
+ extension: ""
+ runner: ubuntu-latest
+ cross: true
+ - target: aarch64-pc-windows-msvc
+ extension: ".exe"
+ runner: windows-latest
+ cross: false
+ - target: armv7-unknown-linux-gnueabihf
+ extension: ""
+ runner: ubuntu-latest
+ cross: true
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@main
+
+ - name: Install Dependencies on Windows
+ if: ${{ matrix.runner == 'windows-latest' }}
+ run: |
+ choco install make --yes
+ - name: Install Dependencies on MacOS
+ if: ${{ matrix.runner == 'macos-latest' }}
+ run: |
+ brew install make
+
+ - name: Install cross (if needed)
+ if: ${{ matrix.cross }}
+ run: cargo install cross --git https://github.com/cross-rs/cross
+
+ - name: Build Project on cross
+ if: ${{ matrix.cross }}
+ run: |
+ cross build --release --target ${{ matrix.target }} --verbose
+ - name: Build Project
+ if: ${{ !matrix.cross }}
+ run: |
+ rustup target add ${{ matrix.target }}
+ cargo build --release --target ${{ matrix.target }} --verbose
+
+ - name: Rename Artifacts
+ shell: bash
+ run: |
+ mv target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}{,-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }}}
+
+ - name: Release Artifacts
+ uses: softprops/action-gh-release@master
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ files: |
+ target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
@@ -1,44 +1,44 @@
-name: Rust Testing
-
-on:
- pull_request:
- push:
- branches: [ main ]
- workflow_dispatch:
- workflow_call:
-
-env:
- CARGO_TERM_COLOR: always
-
-jobs:
- test:
- name: Test
- runs-on: ${{ matrix.os }}
- needs: ["check"]
- strategy:
- matrix:
- os: [ubuntu-latest, windows-latest]
- steps:
- - uses: actions/checkout@v3
- - name: Cache Rust dependencies
- uses: Swatinem/rust-cache@v2
- - name: Test Build
- run: cargo build --verbose
- - name: Run tests
- run: cargo test --verbose
-
- check:
- name: Rustfmt
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Cache Rust dependencies
- uses: Swatinem/rust-cache@v2
- - name: Install Rust fmt
- run: rustup component add rustfmt
- - name: Install Rust clippy
- run: rustup component add clippy
- - name: Run rustfmt
- run: cargo fmt --all -- --check
- - name: Run clippy
- run: cargo clippy --all-targets --all-features -- -D warnings
+name: Rust Testing
+
+on:
+ pull_request:
+ push:
+ branches: [main]
+ workflow_dispatch:
+ workflow_call:
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ test:
+ name: Test
+ runs-on: ${{ matrix.os }}
+ needs: ["check"]
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest]
+ steps:
+ - uses: actions/checkout@main
+ - name: Cache Rust dependencies
+ uses: Swatinem/rust-cache@v2
+ - name: Test Build
+ run: cargo build --verbose
+ - name: Run tests
+ run: cargo test --verbose
+
+ check:
+ name: Rustfmt
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@main
+ - name: Cache Rust dependencies
+ uses: Swatinem/rust-cache@v2
+ - name: Install Rust fmt
+ run: rustup component add rustfmt
+ - name: Install Rust clippy
+ run: rustup component add clippy
+ - name: Run rustfmt
+ run: cargo fmt --all -- --check
+ - name: Run clippy
+ run: cargo clippy --all-targets --all-features -- -D warnings
diff --git a/src/buffer.rs b/src/buffer.rs
@@ -105,9 +105,6 @@ impl Buffer {
.append(true)
.open(&self.swap_path)?;
- // 現在の全ての差分をスワップファイルに書き出す
- // 本来は「今回の編集セッションの変更点」だけに絞るのが効率的だが、
- // 現状のログ形式を維持するため、全ての deltas を再出力する
for (idx, content) in &self.deltas {
writeln!(swap_file, "{}:{}", idx, content.replace(['\n', '\r'], ""))?;
}
diff --git a/src/main.rs b/src/main.rs
@@ -221,7 +221,6 @@ fn run(
f.render_widget(Paragraph::new(status), chunks[1]);
})?;
- // カーソル位置の調整
if let Some(ref b) = buffer {
let line = b.read_line(editor.cursor_line).unwrap_or_default();
let line_len = line.replace(['\n', '\r'], "").len();
@@ -302,7 +301,6 @@ fn run(
if key.code == KeyCode::Esc {
editor.mode = Mode::Normal;
if let Some(ref mut b) = buffer {
- // Insertモード終了時にスワップファイルに書き出す
b.sync_to_swap()?;
let line = b.read_line(editor.cursor_line).unwrap_or_default();