diff --git a/.clippy.toml b/.clippy.toml index 429501f3..d38d35a9 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -2,4 +2,4 @@ # https://rust-lang.github.io/rust-clippy/master/index.html # Don't warn for functions with too many arguments. Default: 7 -too-many-arguments-threshold = 10 +too-many-arguments-threshold=10 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index f5a06708..0853d8e7 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -38,20 +38,3 @@ jobs: - name: cargo clippy run: cargo clippy --all - - udeps: - name: udeps - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2024-06-10 - - - name: install udeps - run: cargo install --git https://github.com/est31/cargo-udeps --locked - - - name: cargo udeps - run: cargo udeps diff --git a/.rustfmt.toml b/.rustfmt.toml index a6271c67..fccf4622 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -3,42 +3,42 @@ # https://rust-lang.github.io/rustfmt # version-related -edition = "2021" # redundant, fmt will read Cargo.toml for editor edition year -unstable_features = true -use_try_shorthand = true # replace any `try!` (2015 Rust) with `?` +edition ="2021" # redundant, fmt will read Cargo.toml for editor edition year +unstable_features=true +use_try_shorthand=true # replace any `try!` (2015 Rust) with `?` # misc formatting -condense_wildcard_suffixes = true # replace: (a,b,_,_)=(1, 2, 3, 4); -> (a,b,..)=(1, 2, 3, 4); -format_code_in_doc_comments = true # format code blocks in doc comments -format_macro_matchers = true # $a: ident -> $a:ident -format_strings = true # break and insert newlines for long string literals -match_block_trailing_comma = true # include comma in match blocks after '}' -normalize_comments = true # convert /*..*/ to //.. where possible -reorder_impl_items = true # move `type` and `const` declarations to top of impl block -struct_field_align_threshold = 20 # align struct arguments' types vertically -use_field_init_shorthand = true # struct initialization short {x: x} -> {x} +condense_wildcard_suffixes =true # replace: (a,b,_,_)=(1, 2, 3, 4); -> (a,b,..)=(1, 2, 3, 4); +format_code_in_doc_comments =true # format code blocks in doc comments +format_macro_matchers =true # $a: ident -> $a:ident +format_strings =true # break and insert newlines for long string literals +match_block_trailing_comma =true # include comma in match blocks after '}' +normalize_comments =true # convert /*..*/ to //.. where possible +reorder_impl_items =true # move `type` and `const` declarations to top of impl block +struct_field_align_threshold=20 # align struct arguments' types vertically +use_field_init_shorthand =true # struct initialization short {x: x} -> {x} # reduce whitespace -blank_lines_upper_bound = 1 # default: 1. Sometimes useful to change to 0 to condense a file. -brace_style = "PreferSameLine" # prefer starting `{` without inserting extra \n -fn_single_line = true # if it's a short 1-liner, let it be a short 1-liner -match_arm_blocks = false # remove unnecessary {} in match arms -newline_style = "Unix" # not auto, we won the culture war. \n over \r\n -overflow_delimited_expr = true # prefer ]); to ]\n); -where_single_line = true # put where on a single line if possible +blank_lines_upper_bound=1 # default: 1. Sometimes useful to change to 0 to condense a file. +brace_style ="PreferSameLine" # prefer starting `{` without inserting extra \n +fn_single_line =true # if it's a short 1-liner, let it be a short 1-liner +match_arm_blocks =false # remove unnecessary {} in match arms +newline_style ="Unix" # not auto, we won the culture war. \n over \r\n +overflow_delimited_expr=true # prefer ]); to ]\n); +where_single_line =true # put where on a single line if possible # imports preferences -group_imports = "StdExternalCrate" # create import groupings for std, external libs, and internal deps -imports_granularity = "Crate" # aggressively group imports +group_imports ="StdExternalCrate" # create import groupings for std, external libs, and internal deps +imports_granularity="Crate" # aggressively group imports # width settings: everything to 100 -comment_width = 100 # default: 80 -inline_attribute_width = 60 # inlines #[cfg(test)]\nmod test -> #[cfg(test)] mod test -max_width = 100 # default: 100 -use_small_heuristics = "Max" # don't ever newline short of `max_width`. -wrap_comments = true # wrap comments at `comment_width` +comment_width =100 # default: 80 +inline_attribute_width=60 # inlines #[cfg(test)]\nmod test -> #[cfg(test)] mod test +max_width =100 # default: 100 +use_small_heuristics ="Max" # don't ever newline short of `max_width`. +wrap_comments =true # wrap comments at `comment_width` # format_strings = true # wrap strings at `max_length` # tabs and spaces -hard_tabs = false # (def: false) use spaces over tabs -tab_spaces = 2 # 2 > 4, it's just math. +hard_tabs =false # (def: false) use spaces over tabs +tab_spaces=2 # 2 > 4, it's just math. diff --git a/.taplo.toml b/.taplo.toml index e88b1f4d..f58bb47b 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -3,17 +3,17 @@ [formatting] # align entries vertically -align_entries = true +align_entries=true # allow up to 1 consecutive empty line (default: 2) -allowed_blank_lines = 1 +allowed_blank_lines=1 # collapse arrays into one line if they fit -array_auto_collapse = true +array_auto_collapse=true # default: 80 -column_width = 100 +column_width=100 # remove whitespace around '=' -compact_entries = true +compact_entries=true # alphabetically sort entries not separated by line breaks -reorder_keys = false +reorder_keys=false # align entries vertically (default: true) # align_comments =false # expand arrays into multiple lines (default: true) diff --git a/Cargo.toml b/Cargo.toml index 9b9d0e04..d553de9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,8 @@ edition ="2021" license ="Apache2.0 OR MIT" name ="ronkathon" repository ="https://github.com/pluto/ronkathon" -version = "0.1.0" +version ="0.1.0" +exclude =["CHANGELOG.md"] [dependencies] rand ="0.8.5" @@ -29,12 +30,11 @@ ark-serialize={ git="https://github.com/arkworks-rs/algebra/" } ark-std ={ git="https://github.com/arkworks-rs/std/" } [[bin]] -name = "hmac_sha256_bin" -path = "src/hmac/bin/hmac_sha256_bin.rs" +name="hmac_sha256_bin" +path="src/hmac/bin/hmac_sha256_bin.rs" [[example]] name="aes_chained_cbc" [[example]] name="symmetric_group" - diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 32999624..175afcc8 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -3,7 +3,7 @@ [toolchain] # what toolchain to use. -channel = "nightly-2024-06-10" +channel="nightly-2024-06-10" # option to specify a date to pin to a particular release # date = "2024-03-19"