Skip to content

Commit

Permalink
Merge pull request scylladb#1013 from muzarski/clippy_fix_06_18
Browse files Browse the repository at this point in the history
CI: fix clippy issues
  • Loading branch information
Lorak-mmk authored Jun 20, 2024
2 parents 0f73b6a + c531974 commit c8db77b
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/authenticate_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ jobs:
options: --health-cmd "cqlsh --username cassandra --password cassandra --debug" --health-interval 5s --health-retries 30
steps:
- uses: actions/checkout@v3
- name: Update rust toolchain
run: rustup update
- name: Run tests
run: RUST_LOG=trace cargo test --verbose authenticate_superuser -- custom_authentication --ignored
2 changes: 2 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
options: --health-cmd "cqlsh --debug scylladb" --health-interval 5s --health-retries 10
steps:
- uses: actions/checkout@v3
- name: Update rust toolchain
run: rustup update
- name: Install mdbook
run: cargo install mdbook --no-default-features
- name: Build the project
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cassandra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
run: |
docker compose -f test/cluster/cassandra/docker-compose.yml up -d --wait
# A separate step for building to separate measuring time of compilation and testing
- name: Update rust toolchain
run: rustup update
- name: Build the project
run: cargo build --verbose --tests --features "full-serialization"
- name: Run tests on cassandra
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
run: |
sudo sh -c "echo 2097152 >> /proc/sys/fs/aio-max-nr"
docker compose -f test/cluster/docker-compose.yml up -d --wait
- name: Update rust toolchain
run: rustup update
- name: Print rustc version
run: rustc --version
- name: Print rustfmt version
Expand Down Expand Up @@ -98,5 +100,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update rust toolchain
run: rustup update
- name: Compile docs
run: RUSTDOCFLAGS=-Dwarnings cargo doc
4 changes: 4 additions & 0 deletions .github/workflows/semver_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
# I don't know any way to do this using checkout action
- name: Fetch PR base
run: git fetch origin "$PR_BASE"
- name: Update rust toolchain
run: rustup update
- name: Install semver-checks
# Official action uses binary releases fetched from GitHub
# If this pipeline becomes too slow, we should do this too
Expand Down Expand Up @@ -142,6 +144,8 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Update rust toolchain
run: rustup update
- name: Install semver-checks
run: cargo install cargo-semver-checks --no-default-features
- name: Run semver-checks to see if it agrees with version updates
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
run: |
ccm create serverless -i 127.0.1. -n 1 --scylla -v release:5.1.6
ccm start --sni-proxy --sni-port 7777
- name: Update rust toolchain
run: rustup update
- name: Check
run: cargo check --verbose
- name: Run cloud example
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
working-directory: ./scylla
steps:
- uses: actions/checkout@v3
- name: Update rust toolchain
run: rustup update
- name: Check
run: cargo check --verbose --features "ssl"
working-directory: ${{env.working-directory}}
Expand Down
3 changes: 3 additions & 0 deletions scylla-macros/src/serialize/row.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// See: https://github.com/TedDriggs/darling/issues/293
#![allow(clippy::manual_unwrap_or_default)]

use std::collections::HashMap;

use darling::FromAttributes;
Expand Down
3 changes: 3 additions & 0 deletions scylla-macros/src/serialize/value.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// See: https://github.com/TedDriggs/darling/issues/293
#![allow(clippy::manual_unwrap_or_default)]

use std::collections::HashMap;

use darling::FromAttributes;
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ struct StreamIdSet {

impl StreamIdSet {
fn new() -> Self {
const BITMAP_SIZE: usize = (std::i16::MAX as usize + 1) / 64;
const BITMAP_SIZE: usize = (i16::MAX as usize + 1) / 64;
Self {
used_bitmap: vec![0; BITMAP_SIZE].into_boxed_slice(),
}
Expand Down

0 comments on commit c8db77b

Please sign in to comment.