Skip to content

Commit

Permalink
Removing gloo_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinswiber committed Nov 30, 2023
1 parent 2315b79 commit 1279e06
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
14 changes: 0 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ serde_yaml = "0.9"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = { version = "0.1.6", optional = true }
gloo-utils = { version = "0.2", features = ["serde"] }
wasm-bindgen = "0.2"
js-sys = "0.3"
wee_alloc = { version = "0.4.5", optional = true }
Expand Down
8 changes: 3 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use crate::core::{Backend, CreateOperationParams, Frontend, State, Variables};
use crate::formats::openapi;
use crate::formats::postman;
use core::VAR_REPLACE_CREDITS;
#[cfg(target_arch = "wasm32")]
use gloo_utils::format::JsValueSerdeExt;
use std::borrow::Cow;
use std::collections::BTreeMap;
#[cfg(target_arch = "wasm32")]
Expand Down Expand Up @@ -74,9 +72,9 @@ pub fn transpile(collection: JsValue) -> std::result::Result<JsValue, JsValue> {
match postman_spec {
Ok(s) => {
let oas_spec = Transpiler::transpile(s);
let oas_definition = JsValue::from_serde(&oas_spec);
match oas_definition {
Ok(val) => Ok(val),
let s = serde_json::to_string(&oas_spec);
match s {
Ok(s) => Ok(js_sys::JSON::parse(&s).unwrap_throw()),
Err(err) => Err(JsValue::from_str(&err.to_string())),
}
}
Expand Down

0 comments on commit 1279e06

Please sign in to comment.