Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: maintenance before release #42

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading