From b32a6f8ad20e6e4b0cc24b8256c08192b4899844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 7 Mar 2023 17:37:37 -0400 Subject: 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. --- ext/web/benches/encoding.rs | 1 - ext/web/benches/timers_ops.rs | 1 - ext/web/lib.rs | 1 - 3 files changed, 3 deletions(-) (limited to 'ext/web') diff --git a/ext/web/benches/encoding.rs b/ext/web/benches/encoding.rs index e9ef3a563..ffea2617e 100644 --- a/ext/web/benches/encoding.rs +++ b/ext/web/benches/encoding.rs @@ -40,7 +40,6 @@ fn setup() -> Vec { }]) .state(|state| { state.put(Permissions {}); - Ok(()) }) .build(), ] diff --git a/ext/web/benches/timers_ops.rs b/ext/web/benches/timers_ops.rs index f177f7d83..8c700266a 100644 --- a/ext/web/benches/timers_ops.rs +++ b/ext/web/benches/timers_ops.rs @@ -38,7 +38,6 @@ fn setup() -> Vec { ]) .state(|state| { state.put(Permissions{}); - Ok(()) }) .build() ] diff --git a/ext/web/lib.rs b/ext/web/lib.rs index 76095810e..1af4cc29d 100644 --- a/ext/web/lib.rs +++ b/ext/web/lib.rs @@ -121,7 +121,6 @@ pub fn init( state.put(Location(location)); } state.put(StartTime::now()); - Ok(()) }) .build() } -- cgit v1.2.3