Document all Errors (#55)

* Document all `Error`s

* Fix inaccuracies
This commit is contained in:
daxpedda
2022-01-24 20:55:02 -08:00
committed by GitHub
parent 16e072dcd4
commit b01b8ed409
9 changed files with 249 additions and 125 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ fn test_group_properties() -> Result<()> {
fn test_identity_element_error<G: Group>() -> Result<()> {
let identity = G::identity_elem();
let result = G::deserialize_elem(&G::serialize_elem(identity));
assert!(matches!(result, Err(Error::PointError)));
assert!(matches!(result, Err(Error::Deserialization)));
Ok(())
}
@@ -43,7 +43,7 @@ fn test_identity_element_error<G: Group>() -> Result<()> {
fn test_zero_scalar_error<G: Group>() -> Result<()> {
let zero_scalar = G::zero_scalar();
let result = G::deserialize_scalar(&G::serialize_scalar(zero_scalar));
assert!(matches!(result, Err(Error::ScalarError)));
assert!(matches!(result, Err(Error::Deserialization)));
Ok(())
}