Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
fix cs error too
Browse files Browse the repository at this point in the history
  • Loading branch information
shamatar committed Jun 17, 2020
1 parent 8a96585 commit b6125d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage = "https://github.com/matter-labs/bellman"
license = "MIT/Apache-2.0"
name = "bellman_ce"
repository = "https://github.com/matter-labs/bellman"
version = "0.3.4"
version = "0.3.5"
edition = "2018"

[lib]
Expand All @@ -17,8 +17,7 @@ rand = "0.4"
bit-vec = "0.6"
cfg-if = "0.1"

#pairing = {package = "pairing_ce", path = "../pairing" }
pairing = {package = "pairing_ce", version = "0.21" }
pairing = {package = "pairing_ce", version = "0.21.*" }
byteorder = "1"

futures= {package = "futures", version = "0.3", default_features = false, features = ["executor"]}
Expand All @@ -35,7 +34,6 @@ blake2-rfc = {version = "0.2.18", optional = true}
[features]
# default = []
default = ["multicore"]
#default = ["wasm"]
multicore = ["crossbeam", "futures/thread-pool"]
sonic = ["tiny-keccak", "blake2-rfc"]
gm17 = []
Expand Down
12 changes: 9 additions & 3 deletions src/cs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ impl From<io::Error> for SynthesisError {
}
}

impl Error for SynthesisError {
fn description(&self) -> &str {
impl SynthesisError {
pub fn self_description(&self) -> &str {
match *self {
SynthesisError::AssignmentMissing => "an assignment for a variable could not be computed",
SynthesisError::DivisionByZero => "division by zero",
Expand All @@ -193,13 +193,19 @@ impl Error for SynthesisError {
}
}

impl Error for SynthesisError {
fn description(&self) -> &str {
self.self_description()
}
}

impl fmt::Display for SynthesisError {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
if let &SynthesisError::IoError(ref e) = self {
write!(f, "I/O error: ")?;
e.fmt(f)
} else {
write!(f, "{}", self.to_string())
write!(f, "{}", self.self_description())
}
}
}
Expand Down

0 comments on commit b6125d2

Please sign in to comment.