From 4232bdd298defb9bb04e0c6c652d6015ac413162 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sat, 8 Jun 2024 20:28:45 -0700 Subject: [PATCH] Cargo format --- src-tauri/src/deno_ops.rs | 6 ++++-- src-tauri/src/http_request.rs | 5 +---- src-tauri/src/notifications.rs | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src-tauri/src/deno_ops.rs b/src-tauri/src/deno_ops.rs index 6430f208..cc9a0ef6 100644 --- a/src-tauri/src/deno_ops.rs +++ b/src-tauri/src/deno_ops.rs @@ -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] +pub fn op_yaml_parse(#[string] text: String) -> Result { let value = serde_yaml::from_str(&text)?; Ok(value) } #[op2] -#[string] pub fn op_yaml_stringify(#[serde] value: serde_json::Value) -> Result { +#[string] +pub fn op_yaml_stringify(#[serde] value: serde_json::Value) -> Result { let value = serde_yaml::to_string(&value)?; Ok(value) } diff --git a/src-tauri/src/http_request.rs b/src-tauri/src/http_request.rs index dfd6999e..587daff4 100644 --- a/src-tauri/src/http_request.rs +++ b/src-tauri/src/http_request.rs @@ -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, } } diff --git a/src-tauri/src/notifications.rs b/src-tauri/src/notifications.rs index c1676394..44091934 100644 --- a/src-tauri/src/notifications.rs +++ b/src-tauri/src/notifications.rs @@ -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};