mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
chore(deps): update cargo dependencies (#4329)
* chore(deps): update cargo dependencies * fix: update warp dependency to include server feature * fix: update return type of scheme_handler to String for consistency * fix: add hyper-util dependency and update warp path handlers for response status --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tunglies <tunglies.dev@outlook.com> Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
This commit is contained in:
@@ -49,12 +49,12 @@ pub fn embed_server() {
|
||||
let port = IVerge::get_singleton_port();
|
||||
|
||||
AsyncHandler::spawn(move || async move {
|
||||
let visible = warp::path!("commands" / "visible").map(move || {
|
||||
let visible = warp::path!("commands" / "visible").map(|| {
|
||||
resolve::create_window(false);
|
||||
"ok"
|
||||
warp::reply::with_status("ok".to_string(), warp::http::StatusCode::OK)
|
||||
});
|
||||
|
||||
let pac = warp::path!("commands" / "pac").map(move || {
|
||||
let pac = warp::path!("commands" / "pac").map(|| {
|
||||
let content = Config::verge()
|
||||
.latest_ref()
|
||||
.pac_file_content
|
||||
@@ -70,13 +70,13 @@ pub fn embed_server() {
|
||||
.body(content)
|
||||
.unwrap_or_default()
|
||||
});
|
||||
async fn scheme_handler(query: QueryParam) -> Result<impl warp::Reply, Infallible> {
|
||||
async fn scheme_handler(query: QueryParam) -> Result<String, Infallible> {
|
||||
logging_error!(
|
||||
Type::Setup,
|
||||
true,
|
||||
resolve::resolve_scheme(query.param).await
|
||||
);
|
||||
Ok("ok")
|
||||
Ok("ok".to_string())
|
||||
}
|
||||
|
||||
let scheme = warp::path!("commands" / "scheme")
|
||||
|
||||
Reference in New Issue
Block a user