Skip to content

Commit

Permalink
chore: maintenance before release (#42)
Browse files Browse the repository at this point in the history
* chore: bump to rust 1.73

* chore: add same clippy spec as lurk
  • Loading branch information
huitseeker authored Oct 26, 2023
1 parent 542bf03 commit 4bde01b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 12 deletions.
21 changes: 19 additions & 2 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,27 @@
# clippy doesn't currently allow for specifiying project-wide lints in a
# configuration file. This is a similar workaround to the ones presented here:
# <https://github.com/EmbarkStudios/rust-ecosystem/issues/59>
# TODO: add support for --all-features
xclippy = [
"clippy", "--all-targets", "--",
"clippy", "--workspace", "--all-targets", "--",
"-Wclippy::all",
"-Wclippy::cast_lossless",
"-Wclippy::dbg_macro",
"-Wclippy::disallowed_methods",
"-Wclippy::derive_partial_eq_without_eq",
"-Wclippy::enum_glob_use",
"-Wclippy::filter_map_next",
"-Wclippy::flat_map_option",
"-Wclippy::inefficient_to_string",
"-Wclippy::large_types_passed_by_value",
"-Wclippy::manual_assert",
"-Wclippy::manual_ok_or",
"-Wclippy::map_flatten",
"-Wclippy::map_unwrap_or",
"-Wclippy::needless_borrow",
"-Wclippy::checked_conversions",
"-Wclippy::trait_duplication_in_bounds",
"-Wrust_2018_idioms",
"-Wtrivial_numeric_casts",
"-Wunused_lifetimes",
"-Wmissing_debug_implementations",
]
8 changes: 5 additions & 3 deletions crates/bellpepper-core/src/util_cs/test_cs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,11 @@ impl<Scalar: PrimeField> TestConstraintSystem<Scalar> {
}

fn set_named_obj(&mut self, path: String, to: NamedObject) {
if self.named_objects.contains_key(&path) {
panic!("tried to create object at existing path: {}", path);
}
assert!(
!self.named_objects.contains_key(&path),
"tried to create object at existing path: {}",
path
);

self.named_objects.insert(path, to);
}
Expand Down
15 changes: 9 additions & 6 deletions crates/bellpepper/src/util_cs/metric_cs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,11 @@ impl<Scalar: PrimeField> MetricCS<Scalar> {
}

fn set_named_obj(&mut self, path: String, to: NamedObject) {
if self.named_objects.contains_key(&path) {
panic!("tried to create object at existing path: {}", path);
}
assert!(
!self.named_objects.contains_key(&path),
"tried to create object at existing path: {}",
path
);

self.named_objects.insert(path, to);
}
Expand Down Expand Up @@ -284,9 +286,10 @@ impl<Scalar: PrimeField> ConstraintSystem<Scalar> for MetricCS<Scalar> {
}

fn compute_path(ns: &[String], this: &str) -> String {
if this.chars().any(|a| a == '/') {
panic!("'/' is not allowed in names");
}
assert!(
!this.chars().any(|a| a == '/'),
"'/' is not allowed in names"
);

let mut name = String::new();

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.72.1
1.73.0

0 comments on commit 4bde01b

Please sign in to comment.