Cargo format

This commit is contained in:
Gregory Schier
2024-06-08 20:28:45 -07:00
parent ef1c5da027
commit 4232bdd298
3 changed files with 6 additions and 7 deletions

View File

@@ -2,13 +2,15 @@ use deno_core::error::AnyError;
use deno_core::op2;
#[op2]
#[serde] pub fn op_yaml_parse(#[string] text: String) -> Result<serde_json::Value, AnyError> {
#[serde]
pub fn op_yaml_parse(#[string] text: String) -> Result<serde_json::Value, AnyError> {
let value = serde_yaml::from_str(&text)?;
Ok(value)
}
#[op2]
#[string] pub fn op_yaml_stringify(#[serde] value: serde_json::Value) -> Result<String, AnyError> {
#[string]
pub fn op_yaml_stringify(#[serde] value: serde_json::Value) -> Result<String, AnyError> {
let value = serde_yaml::to_string(&value)?;
Ok(value)
}

View File

@@ -476,10 +476,7 @@ pub async fn send_http_request(
Ok(response)
}
Err(e) => {
warn!("FAILED TO SEND REQUEST {:?}", e);
response_err(response, e.to_string(), window).await
},
Err(e) => response_err(response, e.to_string(), window).await,
}
}

View File

@@ -1,8 +1,8 @@
use std::time::SystemTime;
use chrono::{Duration, NaiveDateTime, Utc};
use reqwest::Method;
use log::debug;
use reqwest::Method;
use serde::{Deserialize, Serialize};
use tauri::{AppHandle, Manager};