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:
1 parent
2a515a3fc9
commit
57e3543c64
4 files changed
+38
-12
No files matched your search
@@ -221,6 +221,7 @@ jobs:
|
|||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
name: Playwright Tests
|
name: Playwright Tests
|
||||||
runs-on: blacksmith-8vcpu-ubuntu-2404
|
runs-on: blacksmith-8vcpu-ubuntu-2404
|
||||||
|
timeout-minutes: 45
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
@@ -286,15 +287,6 @@ jobs:
|
|||||||
args: "--all --tests",
|
args: "--all --tests",
|
||||||
platform: "desktop",
|
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,
|
target: aarch64-apple-ios,
|
||||||
os: macos-latest,
|
os: macos-latest,
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ impl<T> Readable for Loader<T> {
|
|||||||
where
|
where
|
||||||
T: 'static,
|
T: 'static,
|
||||||
{
|
{
|
||||||
Ok(self.peek_unchecked())
|
Ok(self.read_value.peek_unchecked())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn subscribers(&self) -> Subscribers
|
fn subscribers(&self) -> Subscribers
|
||||||
@@ -263,7 +263,8 @@ where
|
|||||||
T: Clone + IntoDynNode + PartialEq + 'static,
|
T: Clone + IntoDynNode + PartialEq + 'static,
|
||||||
{
|
{
|
||||||
fn into_dyn_node(self) -> dioxus_core::DynamicNode {
|
fn into_dyn_node(self) -> dioxus_core::DynamicNode {
|
||||||
self().into_dyn_node()
|
let t: T = self();
|
||||||
|
t.into_dyn_node()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1396,6 +1396,7 @@ enum Method {
|
|||||||
Connect(Ident),
|
Connect(Ident),
|
||||||
Options(Ident),
|
Options(Ident),
|
||||||
Trace(Ident),
|
Trace(Ident),
|
||||||
|
Patch(Ident),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ToTokens for Method {
|
impl ToTokens for Method {
|
||||||
@@ -1408,7 +1409,8 @@ impl ToTokens for Method {
|
|||||||
| Self::Head(ident)
|
| Self::Head(ident)
|
||||||
| Self::Connect(ident)
|
| Self::Connect(ident)
|
||||||
| Self::Options(ident)
|
| Self::Options(ident)
|
||||||
| Self::Trace(ident) => {
|
| Self::Trace(ident)
|
||||||
|
| Self::Patch(ident) => {
|
||||||
ident.to_tokens(tokens);
|
ident.to_tokens(tokens);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1444,6 +1446,7 @@ impl Method {
|
|||||||
Self::Connect(span) => Ident::new("connect", span.span()),
|
Self::Connect(span) => Ident::new("connect", span.span()),
|
||||||
Self::Options(span) => Ident::new("options", span.span()),
|
Self::Options(span) => Ident::new("options", span.span()),
|
||||||
Self::Trace(span) => Ident::new("trace", 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())),
|
"CONNECT" => Self::Connect(Ident::new("CONNECT", Span::call_site())),
|
||||||
"OPTIONS" => Self::Options(Ident::new("OPTIONS", Span::call_site())),
|
"OPTIONS" => Self::Options(Ident::new("OPTIONS", Span::call_site())),
|
||||||
"TRACE" => Self::Trace(Ident::new("TRACE", 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)"),
|
_ => panic!("expected one of (GET, POST, PUT, DELETE, HEAD, CONNECT, OPTIONS, TRACE)"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -342,3 +342,32 @@ mod input_types {
|
|||||||
Ok(())
|
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())
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user