Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

style(app): format the widget scheme and navigation tests (#7202)

oxoxDev92c20acdbf98
diff --git a/crates/openhuman-app/src/external_navigation_tests.rs b/crates/openhuman-app/src/external_navigation_tests.rs
index c5adfaf4d5..89284d1d6f 100644
--- a/crates/openhuman-app/src/external_navigation_tests.rs
+++ b/crates/openhuman-app/src/external_navigation_tests.rs
@@ -86,7 +86,12 @@ fn other_webviews_are_left_to_their_own_handlers() {
#[test]
fn widget_sandbox_origin_stays_in_the_main_webview() {
assert_eq!(
- navigation_handoff("main", &url("http://ohwidget.localhost/proxy"), "http", None),
+ navigation_handoff(
+ "main",
+ &url("http://ohwidget.localhost/proxy"),
+ "http",
+ None
+ ),
None
);
assert_eq!(
diff --git a/crates/openhuman-app/src/widget_scheme.rs b/crates/openhuman-app/src/widget_scheme.rs
index 9136b6b2c4..26ddb68c76 100644
--- a/crates/openhuman-app/src/widget_scheme.rs
+++ b/crates/openhuman-app/src/widget_scheme.rs
@@ -33,9 +33,7 @@ fn declared_origins(query: &str) -> (Vec<String>, Vec<String>) {
_ => {}
}
}
- let reduce = |items: Vec<Value>| {
- tinymcp::ui::https_origins(Some(&Value::Array(items)))
- };
+ let reduce = |items: Vec<Value>| tinymcp::ui::https_origins(Some(&Value::Array(items)));
(reduce(connect), reduce(resource))
}
diff --git a/crates/openhuman-app/src/widget_scheme_tests.rs b/crates/openhuman-app/src/widget_scheme_tests.rs
index 29242ff3b3..66c3cccf7c 100644
--- a/crates/openhuman-app/src/widget_scheme_tests.rs
+++ b/crates/openhuman-app/src/widget_scheme_tests.rs
@@ -46,18 +46,25 @@ fn proxy_opens_only_declared_https_origins() {
#[test]
fn unknown_paths_and_methods_are_refused() {
- assert_eq!(get("ohwidget://localhost/other").status(), StatusCode::NOT_FOUND);
+ assert_eq!(
+ get("ohwidget://localhost/other").status(),
+ StatusCode::NOT_FOUND
+ );
let request = Request::builder()
.method("POST")
.uri("ohwidget://localhost/proxy")
.body(Vec::new())
.unwrap();
- assert_eq!(response_for(&request).status(), StatusCode::METHOD_NOT_ALLOWED);
+ assert_eq!(
+ response_for(&request).status(),
+ StatusCode::METHOD_NOT_ALLOWED
+ );
}
#[test]
fn csp_semicolons_cannot_be_injected() {
- let response = get("ohwidget://localhost/proxy?connect=https%3A%2F%2Fa.example.com%3B%20script-src%20*");
+ let response =
+ get("ohwidget://localhost/proxy?connect=https%3A%2F%2Fa.example.com%3B%20script-src%20*");
let csp = csp_of(&response);
assert!(!csp.contains("script-src *"));
}