fix a few small bugs (#4955)

* add `Patch` endpoint

* fix stack overflow on loader

* add timeout to playwright

* 45 min

* remove macos x86 from runners
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-11-11 12:37:19 -03:00
1 parent 2a515a3fc9
commit 57e3543c64
4 files changed
+38 -12

No files matched your search

+1 -9
View File
@@ -221,6 +221,7 @@ jobs:
if: github.event.pull_request.draft == false
name: Playwright Tests
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 45
strategy:
matrix:
platform:
@@ -286,15 +287,6 @@ jobs:
args: "--all --tests",
platform: "desktop",
}
- {
target: x86_64-apple-darwin,
os: macos-13,
toolchain: "1.88.0",
cross: false,
command: "test",
args: "--all --tests",
platform: "desktop",
}
- {
target: aarch64-apple-ios,
os: macos-latest,
+3 -2
View File
@@ -238,7 +238,7 @@ impl<T> Readable for Loader<T> {
where
T: 'static,
{
Ok(self.peek_unchecked())
Ok(self.read_value.peek_unchecked())
}
fn subscribers(&self) -> Subscribers
@@ -263,7 +263,8 @@ where
T: Clone + IntoDynNode + PartialEq + 'static,
{
fn into_dyn_node(self) -> dioxus_core::DynamicNode {
self().into_dyn_node()
let t: T = self();
t.into_dyn_node()
}
}
+5 -1
View File
@@ -1396,6 +1396,7 @@ enum Method {
Connect(Ident),
Options(Ident),
Trace(Ident),
Patch(Ident),
}
impl ToTokens for Method {
@@ -1408,7 +1409,8 @@ impl ToTokens for Method {
| Self::Head(ident)
| Self::Connect(ident)
| Self::Options(ident)
| Self::Trace(ident) => {
| Self::Trace(ident)
| Self::Patch(ident) => {
ident.to_tokens(tokens);
}
}
@@ -1444,6 +1446,7 @@ impl Method {
Self::Connect(span) => Ident::new("connect", span.span()),
Self::Options(span) => Ident::new("options", span.span()),
Self::Trace(span) => Ident::new("trace", span.span()),
Self::Patch(span) => Ident::new("patch", span.span()),
}
}
@@ -1457,6 +1460,7 @@ impl Method {
"CONNECT" => Self::Connect(Ident::new("CONNECT", Span::call_site())),
"OPTIONS" => Self::Options(Ident::new("OPTIONS", Span::call_site())),
"TRACE" => Self::Trace(Ident::new("TRACE", Span::call_site())),
"PATCH" => Self::Patch(Ident::new("PATCH", Span::call_site())),
_ => panic!("expected one of (GET, POST, PUT, DELETE, HEAD, CONNECT, OPTIONS, TRACE)"),
}
}
+29
View File
@@ -342,3 +342,32 @@ mod input_types {
Ok(())
}
}
mod handlers {
use super::*;
#[get("/handlers/get")]
async fn handle_get() -> Result<String> {
Ok("handled get".to_string())
}
#[post("/handlers/post")]
async fn handle_post() -> Result<String> {
Ok("handled post".to_string())
}
#[put("/handlers/put")]
async fn handle_put() -> Result<String> {
Ok("handled put".to_string())
}
#[patch("/handlers/patch")]
async fn handle_patch() -> Result<String> {
Ok("handled patch".to_string())
}
#[delete("/handlers/delete")]
async fn handle_delete() -> Result<String> {
Ok("handled delete".to_string())
}
}