Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
macjuul committed Jan 11, 2024
1 parent f605aec commit 4d3bce0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src-embed/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ fn process_result(response: Result<WithStats<Response>, surrealdb::Error>) -> St
entry.insert("result".to_owned(), result);
entry.insert("status".to_owned(), status);
if let Some(time) = stats.execution_time {
entry.insert(
"time".to_owned(),
Value::Duration(time.into()),
);
entry.insert("time".to_owned(), Value::Duration(time.into()));
};

results.push(Value::Object(entry));
Expand Down
6 changes: 4 additions & 2 deletions src-embed/src/schema.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use concat_string::concat_string;
use serde::Serialize;
use serde_wasm_bindgen::to_value;
use surrealdb::sql::{parse, statements::DefineStatement, Index, Permissions, Statement, Strand, thing};
use surrealdb::sql::{
parse, statements::DefineStatement, thing, Index, Permissions, Statement, Strand,
};
use wasm_bindgen::prelude::*;

fn to_response<T: serde::ser::Serialize>(value: &T, name: &str) -> Result<JsValue, String> {
Expand Down Expand Up @@ -353,4 +355,4 @@ pub fn validate_live_query(query: &str) -> Option<String> {
#[wasm_bindgen]
pub fn validate_thing(value: &str) -> bool {
thing(&value).is_ok()
}
}

0 comments on commit 4d3bce0

Please sign in to comment.