Skip to content

Commit 95fb1b6

Browse files
authored
chore: make clippy happy again (#652)
1 parent 2ddc694 commit 95fb1b6

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- name: "Set allowed lints"
8282
run: |
8383
if [ "${{ matrix.toolchain }}" == "nightly" ]; then
84-
echo "ALLOWED=-A non_local_definitions" >> $GITHUB_ENV
84+
echo "ALLOWED=-A non_local_definitions -A clippy::too_long_first_doc_paragraph" >> $GITHUB_ENV
8585
else
8686
echo "ALLOWED=" >> $GITHUB_ENV
8787
fi

starknet-accounts/tests/single_owner_account.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ async fn can_execute_eth_transfer_invoke_v3_inner<P: Provider + Send + Sync>(
354354
selector: get_selector_from_name("transfer").unwrap(),
355355
calldata: vec![Felt::from_hex("0x1234").unwrap(), Felt::ONE, Felt::ZERO],
356356
}])
357-
.gas(200000)
358-
.gas_price(500000000000000)
357+
.gas(100000)
358+
.gas_price(800000000000000)
359359
.send()
360360
.await
361361
.unwrap();
@@ -544,8 +544,8 @@ async fn can_declare_cairo1_contract_v3_inner<P: Provider + Send + Sync>(
544544
Arc::new(flattened_class),
545545
Felt::from_hex(&hashes.compiled_class_hash).unwrap(),
546546
)
547-
.gas(200000)
548-
.gas_price(500000000000000)
547+
.gas(100000)
548+
.gas_price(800000000000000)
549549
.send()
550550
.await
551551
.unwrap();

starknet-contract/tests/contract_deployment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ async fn can_deploy_contract_to_alpha_sepolia_with_invoke_v3() {
8080

8181
let result = factory
8282
.deploy_v3(vec![Felt::ONE], Felt::from_bytes_be(&salt_buffer), true)
83-
.gas(200000)
84-
.gas_price(500000000000000)
83+
.gas(100000)
84+
.gas_price(800000000000000)
8585
.send()
8686
.await;
8787

starknet-core/src/types/eth_address.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl From<[u8; 20]> for EthAddress {
207207

208208
#[cfg(test)]
209209
mod tests {
210-
use super::{EthAddress, Felt, FromBytesSliceError, FromFieldElementError};
210+
use super::{EthAddress, Felt};
211211

212212
use alloc::vec::*;
213213

@@ -291,11 +291,12 @@ mod tests {
291291
#[test]
292292
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
293293
fn test_eth_address_from_felt_error() {
294-
match EthAddress::from_felt(
294+
if EthAddress::from_felt(
295295
&Felt::from_hex("0x10000000000000000000000000000000000000000").unwrap(),
296-
) {
297-
Ok(_) => panic!("Expected error, but got Ok"),
298-
Err(FromFieldElementError) => {}
296+
)
297+
.is_ok()
298+
{
299+
panic!("Expected error, but got Ok");
299300
}
300301
}
301302

@@ -304,9 +305,8 @@ mod tests {
304305
fn test_eth_address_from_slice_invalid_slice() {
305306
let buffer: Vec<u8> = vec![0, 1, 2, 3, 4, 5, 6, 7];
306307

307-
match EthAddress::try_from(&buffer[0..4]) {
308-
Ok(_) => panic!("Expected error, but got Ok"),
309-
Err(FromBytesSliceError) => {}
308+
if EthAddress::try_from(&buffer[0..4]).is_ok() {
309+
panic!("Expected error, but got Ok");
310310
}
311311
}
312312
}

starknet-core/src/types/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ pub enum TransactionTrace {
426426
}
427427

428428
/// The execution result of a function invocation.
429+
#[allow(clippy::large_enum_variant)]
429430
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
430431
#[serde(untagged)]
431432
pub enum ExecuteInvocation {

0 commit comments

Comments
 (0)