1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +01:00
This commit is contained in:
Rob Ede 2022-07-31 15:34:52 +01:00
parent c08cd8a23a
commit ab3f591307
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
7 changed files with 12 additions and 16 deletions

View File

@ -35,9 +35,9 @@ impl<'de> de::Deserialize<'de> for Backlog {
impl<'de> de::Visitor<'de> for BacklogVisitor {
type Value = Backlog;
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let msg = "Either \"default\" or a string containing an integer > 0";
formatter.write_str(msg)
f.write_str(msg)
}
fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>

View File

@ -58,9 +58,9 @@ impl<'de> de::Deserialize<'de> for KeepAlive {
impl<'de> de::Visitor<'de> for KeepAliveVisitor {
type Value = KeepAlive;
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let msg = "Either \"default\", \"disabled\", \"os\", or a string of the format \"N seconds\" where N is an integer > 0";
formatter.write_str(msg)
f.write_str(msg)
}
fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>

View File

@ -35,9 +35,9 @@ impl<'de> de::Deserialize<'de> for MaxConnectionRate {
impl<'de> de::Visitor<'de> for MaxConnectionRateVisitor {
type Value = MaxConnectionRate;
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let msg = "Either \"default\" or a string containing an integer > 0";
formatter.write_str(msg)
f.write_str(msg)
}
fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>

View File

@ -35,9 +35,9 @@ impl<'de> de::Deserialize<'de> for MaxConnections {
impl<'de> de::Visitor<'de> for MaxConnectionsVisitor {
type Value = MaxConnections;
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let msg = "Either \"default\" or a string containing an integer > 0";
formatter.write_str(msg)
f.write_str(msg)
}
fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>

View File

@ -2,14 +2,10 @@ use serde::Deserialize;
use crate::{AtResult, Parse};
/// Marker of intended deployment environment.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Mode {
/// Marks development environment.
Development,
/// Marks production environment.
Production,
}

View File

@ -35,9 +35,9 @@ impl<'de> de::Deserialize<'de> for NumWorkers {
impl<'de> de::Visitor<'de> for NumWorkersVisitor {
type Value = NumWorkers;
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let msg = "Either \"default\" or a string containing an integer > 0";
formatter.write_str(msg)
f.write_str(msg)
}
fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>

View File

@ -64,9 +64,9 @@ impl<'de> de::Deserialize<'de> for Timeout {
impl<'de> de::Visitor<'de> for TimeoutVisitor {
type Value = Timeout;
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let msg = "Either \"default\", \"disabled\", \"os\", or a string of the format \"N seconds\" where N is an integer > 0";
formatter.write_str(msg)
f.write_str(msg)
}
fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>