mirror of
https://github.com/vacp2p/zerokit.git
synced 2026-01-09 14:38:01 -05:00
chore(rln): refactor resource initialization (#260)
* chore(rln): optimize into Lazy OnceCells * fix * fix: dont change duration * fix: increase duration? * chore: add backtrace * fix: remove plotter to avoid f64 range failure * fix: remove ci alteration * fix: use arc over witness calc * fix: remove more lifetimes * fix: benchmark correct fn call, not the getter * fix: bench config
This commit is contained in:
committed by
GitHub
parent
c6493bd10f
commit
d8f813bc2e
@@ -19,7 +19,7 @@ pub fn init_panic_hook() {
|
||||
pub struct RLNWrapper {
|
||||
// The purpose of this wrapper is to hold a RLN instance with the 'static lifetime
|
||||
// because wasm_bindgen does not allow returning elements with lifetimes
|
||||
instance: RLN<'static>,
|
||||
instance: RLN,
|
||||
}
|
||||
|
||||
// Macro to call methods with arbitrary amount of arguments,
|
||||
@@ -150,8 +150,8 @@ impl<T> ProcessArg for Vec<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> ProcessArg for *const RLN<'a> {
|
||||
type ReturnType = &'a RLN<'a>;
|
||||
impl ProcessArg for *const RLN {
|
||||
type ReturnType = &'static RLN;
|
||||
fn process(self) -> Self::ReturnType {
|
||||
unsafe { &*self }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user