forked from Proxmox/proxmox
api-server, tools: formatting cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
9654d1feeb
commit
da40267188
@ -2,9 +2,9 @@ use std::io;
|
||||
use std::path::Path;
|
||||
|
||||
use failure::{bail, Error};
|
||||
use tokio::io::AsyncReadExt;
|
||||
use http::Response;
|
||||
use hyper::Body;
|
||||
use tokio::io::AsyncReadExt;
|
||||
|
||||
use proxmox::api::{api, router};
|
||||
|
||||
|
@ -39,15 +39,10 @@ async fn main_do(www_dir: String) {
|
||||
let addr = ([0, 0, 0, 0], 3000).into();
|
||||
|
||||
// And a MakeService to handle each connection...
|
||||
let service = make_service_fn(|_| {
|
||||
async {
|
||||
Ok::<_, hyper::Error>(service_fn(run_request))
|
||||
}
|
||||
});
|
||||
let service = make_service_fn(|_| async { Ok::<_, hyper::Error>(service_fn(run_request)) });
|
||||
|
||||
// Then bind and serve...
|
||||
let server = Server::bind(&addr)
|
||||
.serve(service);
|
||||
let server = Server::bind(&addr).serve(service);
|
||||
|
||||
println!("Serving {} under http://localhost:3000/www/", www_dir);
|
||||
|
||||
|
@ -75,9 +75,7 @@ async fn get_loopback(param: String) -> Result<String, Error> {
|
||||
returns: String
|
||||
})]
|
||||
fn non_async_test(param: String) -> proxmox::api::ApiFuture<Bytes> {
|
||||
Box::pin(async {
|
||||
proxmox::api::IntoApiOutput::into_api_output(param)
|
||||
})
|
||||
Box::pin(async { proxmox::api::IntoApiOutput::into_api_output(param) })
|
||||
}
|
||||
|
||||
proxmox_api_macro::router! {
|
||||
|
@ -34,7 +34,6 @@
|
||||
mod byte_vec;
|
||||
pub use byte_vec::*;
|
||||
|
||||
|
||||
/// Create an uninitialized byte vector of a specific size.
|
||||
///
|
||||
/// This is just a shortcut for:
|
||||
|
Loading…
Reference in New Issue
Block a user