Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run clippy, clean up dependencies #2

Merged
merged 2 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ jobs:
echo "os_name=windows" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "EXT=.exe" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Build binary
run: cargo build --release

- name: Set binary path name
if: matrix.os != 'windows-latest'
run: echo "BINARY_PATH=./target/release/fig" >> $GITHUB_ENV
run: echo "BINARY_PATH=./target/release/fig-amd64-${{ env.os_name }}" >> $GITHUB_ENV

- name: Set binary path name
if: matrix.os == 'windows-latest'
run: echo "BINARY_PATH=./target/release/fig.exe" | Out-File -FilePath $env:GITHUB_ENV -Append
run: echo "BINARY_PATH=./target/release/fig-amd64-windows.exe" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Build binary
run: |
cargo build --release
mv ./target/release/fig${{ env.EXT }} ${{ env.BINARY_PATH }}

- name: Compress binary
uses: svenstaro/upx-action@2.3.0
Expand Down
58 changes: 1 addition & 57 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ chacha20poly1305 = { version = "0.10.1", features = ["heapless"] }
clap = { version = "4.4.8", features = ["derive"] }
image = "0.24.7"
imageproc = "0.23.0"
kdam = "0.5.0"
serde = { version = "1.0.192", features = ["derive"] }
serde_json = "1.0.108"

Expand Down
6 changes: 6 additions & 0 deletions src/lib/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ struct Key {
nonce: Vec<u8>,
}

impl Default for Cipher {
fn default() -> Self {
Self::new()
}
}

impl Cipher {
pub fn new() -> Self {
let key = ChaCha20Poly1305::generate_key(&mut OsRng);
Expand Down
Loading