unproductive flailing
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user