unproductive flailing

This commit is contained in:
Joseph Montanaro 2022-12-28 15:48:25 -08:00
parent 992e3c8db2
commit cb26201506
5 changed files with 31 additions and 6 deletions

25
src-tauri/Cargo.lock generated
View File

@ -78,6 +78,8 @@ dependencies = [
"serde_json",
"sodiumoxide",
"sqlx",
"strum 0.24.1",
"strum_macros 0.24.3",
"sysinfo",
"tauri",
"tauri-build",
@ -3571,9 +3573,15 @@ version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e"
dependencies = [
"strum_macros",
"strum_macros 0.22.0",
]
[[package]]
name = "strum"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"
[[package]]
name = "strum_macros"
version = "0.22.0"
@ -3586,6 +3594,19 @@ dependencies = [
"syn",
]
[[package]]
name = "strum_macros"
version = "0.24.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
dependencies = [
"heck 0.4.0",
"proc-macro2",
"quote",
"rustversion",
"syn",
]
[[package]]
name = "subtle"
version = "2.4.1"
@ -4822,7 +4843,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "007a0353840b23e0c6dc73e5b962ff58ed7f6bc9ceff3ce7fe6fbad8d496edf4"
dependencies = [
"strum",
"strum 0.22.0",
"windows 0.24.0",
"xml-rs",
]

View File

@ -29,6 +29,8 @@ aws-smithy-types = "0.52.0"
aws-config = "0.52.0"
thiserror = "1.0.38"
once_cell = "1.16.0"
strum = "0.24"
strum_macros = "0.24"
[features]
# by default Tauri runs in production mode

View File

@ -77,4 +77,4 @@ fn default_listen_addr() -> Ipv4Addr { Ipv4Addr::LOCALHOST }
fn default_rehide_ms() -> u64 { 1000 }
fn default_start_minimized() -> bool { true }
fn default_start_minimized() -> bool { !cfg!(debug_assertions) } // default to start-minimized in production only

View File

@ -10,13 +10,15 @@ use sqlx::{
};
use serde::{Serialize, Serializer, ser::SerializeMap};
use strum_macros::IntoStaticStr;
pub struct SerializeError<E> {
pub err: E
}
impl<E: std::error::Error> Serialize for SerializeError<E> {
impl<E: std::error::Error> Serialize for SerializeError<E>
{
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(None)?;
map.serialize_entry("msg", &format!("{}", self.err))?;
@ -50,7 +52,7 @@ pub enum SetupError {
// error when attempting to tell a request handler whether to release or deny credentials
#[derive(Debug, ThisError)]
#[derive(Debug, ThisError, IntoStaticStr)]
pub enum SendResponseError {
#[error("The specified credentials request was not found")]
NotFound, // no request with the given id

View File

@ -2,7 +2,7 @@
import { createEventDispatcher } from 'svelte';
import { invoke } from '@tauri-apps/api/tauri';
import Icon from '../ui/icon.svelte';
import Icon from '../ui/Icon.svelte';
export let appState;