Skip to content

Commit

Permalink
chore(pythnet/pythnet_sdk): fix Rust version
Browse files Browse the repository at this point in the history
  • Loading branch information
Riateche committed Nov 6, 2024
1 parent f82cfc7 commit 08b95f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ repos:
- id: cargo-clippy-pythnet-sdk
name: Cargo clippy for pythnet SDK
language: "rust"
entry: cargo +nightly-2024-08-04 clippy --manifest-path ./pythnet/pythnet_sdk/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
entry: cargo +1.82.0 clippy --manifest-path ./pythnet/pythnet_sdk/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
pass_filenames: false
files: pythnet/pythnet_sdk
# Hooks for solana receiver contract
Expand Down
1 change: 1 addition & 0 deletions pythnet/pythnet_sdk/rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.82.0
11 changes: 7 additions & 4 deletions pythnet/pythnet_sdk/src/wire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ pub mod v1 {
Error::InvalidMagic
);
require!(message.major_version == 1, Error::InvalidVersion);
require!(
message.minor_version >= CURRENT_MINOR_VERSION,
Error::InvalidVersion
);
#[allow(clippy::absurd_extreme_comparisons)]
{
require!(
message.minor_version >= CURRENT_MINOR_VERSION,
Error::InvalidVersion
);
}
Ok(message)
}
}
Expand Down

0 comments on commit 08b95f7

Please sign in to comment.