Skip to content

Commit 0ced9e6

Browse files
committed
Work around latest Rust clippy errors (#3)
* Bump default core version * Bump built-in soroban-env dependency (cherry picked from commit 36fda74)
1 parent deecb68 commit 0ced9e6

5 files changed

Lines changed: 27 additions & 22 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@v4
3030
- uses: ./.github/actions/setup-go
3131
with:
32-
go-version: 1.23
32+
go-version: 1.25
3333
- run: rustup update
3434
- uses: stellar/actions/rust-cache@main
3535
- run: make build-libs

.github/workflows/stellar-rpc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ jobs:
108108
STELLAR_RPC_INTEGRATION_TESTS_CORE_MAX_SUPPORTED_PROTOCOL: ${{ matrix.protocol-version }}
109109
STELLAR_RPC_INTEGRATION_TESTS_CAPTIVE_CORE_BIN: /usr/bin/stellar-core
110110
# Use input core_version if provided (workflow_call), otherwise use defaults
111-
PROTOCOL_25_CORE_DEBIAN_PKG_VERSION: ${{ inputs.core_version || '25.2.1-3065.1d7e5d7e6.jammy' }}
112-
PROTOCOL_25_CORE_DOCKER_IMG: stellar/stellar-core:${{ inputs.core_version || '25.2.1-3065.1d7e5d7e6.jammy' }}
111+
PROTOCOL_25_CORE_DEBIAN_PKG_VERSION: ${{ inputs.core_version || '25.2.0-3058.bb195c49d.jammy' }}
112+
PROTOCOL_25_CORE_DOCKER_IMG: stellar/stellar-core:${{ inputs.core_version || '25.2.0-3058.bb195c49d.jammy' }}
113113
CORE_GIT_REF: ${{ inputs.core_git_ref || '' }}
114114

115115
steps:

Cargo.lock

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ version = "=24.0.0"
1515

1616
[workspace.dependencies.soroban-env-host-curr]
1717
package = "soroban-env-host"
18-
version = "=25.0.0"
18+
version = "=25.2.1"
1919

2020
[workspace.dependencies.soroban-simulation-prev]
2121
package = "soroban-simulation"
2222
version = "=24.0.0"
2323

2424
[workspace.dependencies.soroban-simulation-curr]
2525
package = "soroban-simulation"
26-
version = "=25.0.0"
26+
version = "=25.2.1"
2727

2828
[workspace.dependencies.stellar-xdr]
2929
version = "=25.0.0"

cmd/stellar-rpc/lib/preflight/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ fn free_c_xdr(xdr: CXDR) {
362362
return;
363363
}
364364
unsafe {
365-
_ = Vec::from_raw_parts(xdr.xdr, xdr.len, xdr.len);
365+
// We intentionally use len for both length and capacity because the
366+
// allocation was shrunk to fit (see vec_to_c_array).
367+
#[allow(clippy::same_length_and_capacity)]
368+
drop(Vec::from_raw_parts(xdr.xdr, xdr.len, xdr.len));
366369
}
367370
}
368371

@@ -371,6 +374,7 @@ fn free_c_xdr_array(xdr_array: CXDRVector) {
371374
return;
372375
}
373376
unsafe {
377+
#[allow(clippy::same_length_and_capacity)]
374378
let v = Vec::from_raw_parts(xdr_array.array, xdr_array.len, xdr_array.len);
375379
for xdr in v {
376380
free_c_xdr(xdr);
@@ -383,6 +387,7 @@ fn free_c_xdr_diff_array(xdr_array: CXDRDiffVector) {
383387
return;
384388
}
385389
unsafe {
390+
#[allow(clippy::same_length_and_capacity)]
386391
let v = Vec::from_raw_parts(xdr_array.array, xdr_array.len, xdr_array.len);
387392
for diff in v {
388393
free_c_xdr(diff.before);

0 commit comments

Comments
 (0)