From a7822886717bacfcd8a6d6141fc7a5d7adfeb4c3 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 15 Jan 2025 08:47:54 +0200 Subject: [PATCH] rename enum item --- src/app/browser/window/tab/item/page/client/status.rs | 4 ++-- .../window/tab/item/page/client/status/failure.rs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/browser/window/tab/item/page/client/status.rs b/src/app/browser/window/tab/item/page/client/status.rs index c6540663..664e1b8c 100644 --- a/src/app/browser/window/tab/item/page/client/status.rs +++ b/src/app/browser/window/tab/item/page/client/status.rs @@ -33,11 +33,11 @@ impl Status { Self::Cancelled { event: now() } } - /// Create new `Self::Failure` as `Failure::RedirectLimit` + /// Create new `Self::Failure` as `Failure::RedirectCount` pub fn failure_redirect_limit(count: usize, is_global: bool) -> Self { Self::Failure { event: now(), - failure: Failure::redirect_limit(count, is_global), + failure: Failure::redirect_count(count, is_global), } } diff --git a/src/app/browser/window/tab/item/page/client/status/failure.rs b/src/app/browser/window/tab/item/page/client/status/failure.rs index e4fba214..b8e76bb3 100644 --- a/src/app/browser/window/tab/item/page/client/status/failure.rs +++ b/src/app/browser/window/tab/item/page/client/status/failure.rs @@ -4,22 +4,22 @@ use std::fmt::{Display, Formatter, Result}; /// Local `Failure` status for `Client` pub enum Failure { /// Redirection count limit reached by protocol driver or global settings - RedirectLimit { count: usize, is_global: bool }, + RedirectCount { count: usize, is_global: bool }, } impl Failure { // Constructors - /// Create new `Self::RedirectLimit` - pub fn redirect_limit(count: usize, is_global: bool) -> Self { - Self::RedirectLimit { count, is_global } + /// Create new `Self::RedirectCount` + pub fn redirect_count(count: usize, is_global: bool) -> Self { + Self::RedirectCount { count, is_global } } } impl Display for Failure { fn fmt(&self, f: &mut Formatter) -> Result { match self { - Self::RedirectLimit { count, is_global } => { + Self::RedirectCount { count, is_global } => { if *is_global { write!(f, "Redirection limit ({count}) reached by global settings") } else {