Skip to content

Commit

Permalink
updated cargo clippy fix for starknet-ff, starknet-macros, starknet-p…
Browse files Browse the repository at this point in the history
…roviders and starknet-signers
  • Loading branch information
aniketpr01 committed Jun 17, 2024
1 parent 18c5b84 commit bcc926b
Show file tree
Hide file tree
Showing 20 changed files with 1,233 additions and 72 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ no_unknown_fields = [

[workspace.lints]
rust.missing_debug_implementations = "warn"
rust.missing_docs = "allow"
rust.unreachable_pub = "allow"
rust.unused_must_use = "deny"
rust.rust_2018_idioms = { level = "deny", priority = -1 }
rustdoc.all = "warn"
Expand Down Expand Up @@ -102,7 +104,7 @@ unnecessary_struct_initialization = "warn"
string_lit_as_bytes = "warn"
explicit_into_iter_loop = "warn"
explicit_iter_loop = "warn"
type_repetition_in_bounds = "warn"
type_repetition_in_bounds = "allow"
manual_string_new = "warn"
naive_bytecount = "warn"
needless_bitwise_bool = "warn"
Expand Down
5 changes: 2 additions & 3 deletions starknet-curve/src/ec_point.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![allow(clippy::missing_const_for_fn)]
use starknet_ff::FieldElement;

use crate::curve_params::{ALPHA, BETA};
Expand Down Expand Up @@ -31,7 +30,7 @@ impl AffinePoint {
})
}

fn identity() -> Self {
const fn identity() -> Self {
Self {
x: FieldElement::ZERO,
y: FieldElement::ZERO,
Expand Down Expand Up @@ -160,7 +159,7 @@ impl ProjectivePoint {
}
}

fn identity() -> Self {
const fn identity() -> Self {
Self {
x: FieldElement::ZERO,
y: FieldElement::ZERO,
Expand Down
41 changes: 41 additions & 0 deletions starknet-ff/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[package]
name = "starknet-ff"
version = "0.3.7"
authors = ["Jonathan LEI <[email protected]>"]
license = "MIT OR Apache-2.0"
edition = "2021"
readme = "README.md"
repository = "https://github.com/xJonathanLEI/starknet-rs"
homepage = "https://starknet.rs/"
description = """
Starknet field element type
"""
keywords = ["ethereum", "starknet", "web3", "no_std"]

[package.metadata.docs.rs]
all-features = true

[dependencies]
ark-ff = { version = "0.4.2", default-features = false }
crypto-bigint = { version = "0.5.1", default-features = false }
hex = { version = "0.4.3", default-features = false }
serde = { version = "1.0.160", optional = true, default-features = false }
bigdecimal = { version = "0.3.0", optional = true }
num-bigint = { version = "0.4.3", optional = true, default-features = false }


[features]
default = ["std", "serde"]
std = []
alloc = ["serde?/alloc"]
serde = ["dep:serde", "alloc", "bigdecimal?/serde"]
bigdecimal = ["std", "dep:bigdecimal", "dep:num-bigint"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.9", features = ["js"] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.34"

[lints]
workspace = true
Loading

0 comments on commit bcc926b

Please sign in to comment.