Encryption support for the statement store (#14440)

* Added ECIES encryption

* tweaks

* fmt

* Make clippy happy

* Use local keystore

* qed
This commit is contained in:
Arkadiy Paronyan
2023-07-17 20:41:41 +02:00
committed by GitHub
parent c761d4c39e
commit d6d9bd9ea3
28 changed files with 351 additions and 71 deletions
@@ -166,11 +166,11 @@ fn ensure_valid_return_type(item_fn: &ItemFn) -> Result<()> {
if let ReturnType::Type(_, typ) = &item_fn.sig.output {
let non_unit = |span| return Err(Error::new(span, "expected `()`"));
let Type::Path(TypePath { path, qself: _ }) = &**typ else {
return Err(Error::new(
return Err(Error::new(
typ.span(),
"Only `Result<(), BenchmarkError>` or a blank return type is allowed on benchmark function definitions",
))
};
};
let seg = path
.segments
.last()
@@ -780,7 +780,7 @@ fn expand_benchmark(
let call_name = match *expr_call.func {
Expr::Path(expr_path) => {
// normal function call
let Some(segment) = expr_path.path.segments.last() else { return call_err(); };
let Some(segment) = expr_path.path.segments.last() else { return call_err() };
segment.ident.to_string()
},
Expr::Infer(_) => {