diff --git a/.github/workflows/cron-weekly-rustfmt.yml b/.github/workflows/cron-weekly-rustfmt.yml index ec5b69b6..2bb81b80 100644 --- a/.github/workflows/cron-weekly-rustfmt.yml +++ b/.github/workflows/cron-weekly-rustfmt.yml @@ -14,12 +14,18 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - - uses: dtolnay/rust-toolchain@nightly - with: - components: rustfmt + - name: Install stable and nightly rustfmt + run: rustup toolchain install stable nightly --profile minimal --component rustfmt - name: Run Nightly rustfmt - # Run the formatter and manually remove trailing whitespace. - run: cargo +nightly fmt && cargo +nightly fmt --manifest-path e2e-tests/Cargo.toml && git ls-files -- '*.rs' -z | xargs sed -E -i'' -e 's/[[:space:]]+$//' + # Run nightly to apply the nightly-only options (e.g. import grouping), + # then stable so the result matches the stable `--check` in CI, and + # manually remove trailing whitespace. + run: | + cargo +nightly fmt --all + cargo +nightly fmt --manifest-path e2e-tests/Cargo.toml --all + cargo +stable fmt --all + cargo +stable fmt --manifest-path e2e-tests/Cargo.toml --all + git ls-files -- '*.rs' -z | xargs -0 sed -E -i'' -e 's/[[:space:]]+$//' - name: Get the current date run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Create Pull Request diff --git a/ldk-server-cli/src/pay_wait.rs b/ldk-server-cli/src/pay_wait.rs index f5032a03..62a89e89 100644 --- a/ldk-server-cli/src/pay_wait.rs +++ b/ldk-server-cli/src/pay_wait.rs @@ -12,9 +12,9 @@ use std::time::Duration; use ldk_server_client::client::{EventStream, LdkServerClient}; use ldk_server_client::error::LdkServerError; use ldk_server_client::error::LdkServerErrorCode::InternalError; -use ldk_server_client::ldk_server_grpc::api::unified_send_response; use ldk_server_client::ldk_server_grpc::api::{ - GetPaymentDetailsRequest, GetPaymentDetailsResponse, UnifiedSendRequest, UnifiedSendResponse, + unified_send_response, GetPaymentDetailsRequest, GetPaymentDetailsResponse, UnifiedSendRequest, + UnifiedSendResponse, }; use ldk_server_client::ldk_server_grpc::events::event_envelope::Event; diff --git a/ldk-server-macaroons/src/macaroon.rs b/ldk-server-macaroons/src/macaroon.rs index 8982bf1e..148af5e6 100644 --- a/ldk-server-macaroons/src/macaroon.rs +++ b/ldk-server-macaroons/src/macaroon.rs @@ -13,7 +13,8 @@ //! Third-party caveats and other formats are rejected. //! Format: . -use bitcoin_hashes::{cmp::fixed_time_eq, hmac, sha256, Hash, HashEngine}; +use bitcoin_hashes::cmp::fixed_time_eq; +use bitcoin_hashes::{hmac, sha256, Hash, HashEngine}; use hex_conservative::{DisplayHex, FromHex}; /// Maximum binary token size. Hex transport uses twice this many bytes. diff --git a/ldk-server/src/util/config.rs b/ldk-server/src/util/config.rs index d09bfdf3..0ef844ca 100644 --- a/ldk-server/src/util/config.rs +++ b/ldk-server/src/util/config.rs @@ -2321,7 +2321,7 @@ mod tests { r#" [node] network = "regtest" - + [bitcoind] rpc_address = "127.0.0.1:8332" rpc_user = "bitcoind-testuser"