forked from loafle/openapi-generator-original
* [Rust Server] Fix Rust 1.39+ "Box<Future" and "as &Has" compile issue * [Rust Server] Fix Rust server side pathRegEx and baseName not match issue * [Rust Server] Add test case yaml with path parameter.
This commit is contained in:
@@ -48,7 +48,7 @@ fn main() {
|
||||
.arg(Arg::with_name("port")
|
||||
.long("port")
|
||||
.takes_value(true)
|
||||
.default_value("80")
|
||||
.default_value("8080")
|
||||
.help("Port to contact"))
|
||||
.get_matches();
|
||||
|
||||
@@ -82,7 +82,7 @@ fn main() {
|
||||
let result = rt.block_on(client.op_get(
|
||||
???
|
||||
));
|
||||
info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &Has<XSpanIdString>).get().clone());
|
||||
info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has<XSpanIdString>).get().clone());
|
||||
},
|
||||
*/
|
||||
_ => {
|
||||
|
||||
@@ -42,7 +42,7 @@ fn main() {
|
||||
.help("Whether to use HTTPS or not"))
|
||||
.get_matches();
|
||||
|
||||
let addr = "127.0.0.1:80";
|
||||
let addr = "127.0.0.1:8080";
|
||||
|
||||
hyper::rt::run(server::create(addr, matches.is_present("https")));
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ impl<C> Api<C> for Server<C> where C: Has<XSpanIdString>{
|
||||
fn op_get(
|
||||
&self,
|
||||
inline_object: models::InlineObject,
|
||||
context: &C) -> Box<Future<Item=OpGetResponse, Error=ApiError> + Send>
|
||||
context: &C) -> Box<dyn Future<Item=OpGetResponse, Error=ApiError> + Send>
|
||||
{
|
||||
let context = context.clone();
|
||||
info!("op_get({:?}) - X-Span-ID: {:?}", inline_object, context.get().0.clone());
|
||||
|
||||
Reference in New Issue
Block a user