refactor(core): don't use Result in ExtensionBuilder::state (#18066)

There's no point for this API to expect result. If something fails it should
result in a panic during build time to signal to embedder that setup is
wrong.
This commit is contained in:
Bartek Iwańczuk 2023-03-07 17:37:37 -04:00 committed by GitHub
parent 0e3affcd5b
commit b32a6f8ad2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 7 additions and 45 deletions

View file

@ -18,7 +18,6 @@ fn init_proc_state(ps: ProcState) -> Extension {
.ops(vec![op_npm_process_state::decl()])
.state(move |state| {
state.put(ps.clone());
Ok(())
})
.build()
}