From 69ca0e7c572b212da2f35295c88494fc9c2aa4f2 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 19 May 2024 17:06:05 -0500 Subject: [PATCH] Separate medium & large, make large bigger --- actix-http/examples/actix-web.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/actix-http/examples/actix-web.rs b/actix-http/examples/actix-web.rs index 75578e51c..b1feffbd5 100644 --- a/actix-http/examples/actix-web.rs +++ b/actix-http/examples/actix-web.rs @@ -5,6 +5,7 @@ use actix_server::Server; use actix_service::map_config; use actix_web::{dev::AppConfig, get, App}; +static MEDIUM: OnceLock = OnceLock::new(); static LARGE: OnceLock = OnceLock::new(); #[get("/")] @@ -14,12 +15,12 @@ async fn index() -> &'static str { #[get("/large")] async fn large() -> &'static str { - LARGE.get_or_init(|| "123456890".repeat(1024 * 10)) + LARGE.get_or_init(|| "123456890".repeat(1024 * 100)) } #[get("/medium")] async fn medium() -> &'static str { - LARGE.get_or_init(|| "123456890".repeat(1024 * 5)) + MEDIUM.get_or_init(|| "123456890".repeat(1024 * 5)) } #[tokio::main(flavor = "current_thread")]