Pin nightly again
This commit is contained in:
@@ -6,7 +6,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
rust: [nightly-2019-09-03]
|
rust: [nightly]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: hecrj/setup-rust-action@master
|
- uses: hecrj/setup-rust-action@master
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
nightly
|
nightly-2019-09-04
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
use tonic::{Code, Request, Response, Status, Server};
|
use tonic::{Code, Request, Response, Status, Server};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
use tonic_interop::pb::*;
|
||||||
pub mod pb {
|
|
||||||
#![allow(dead_code)]
|
|
||||||
#![allow(unused_imports)]
|
|
||||||
include!(concat!(env!("OUT_DIR"), "/grpc.testing.rs"));
|
|
||||||
}
|
|
||||||
|
|
||||||
use pb::*;
|
|
||||||
|
|
||||||
#[derive(Default, Clone)]
|
#[derive(Default, Clone)]
|
||||||
pub struct TestService {
|
pub struct TestService {
|
||||||
@@ -20,7 +13,7 @@ type Streaming<T> = Request<tonic::Streaming<T>>;
|
|||||||
type Stream<T> = Pin<Box<dyn futures_core::Stream<Item = std::result::Result<T, Status>> + Send + 'static>>;
|
type Stream<T> = Pin<Box<dyn futures_core::Stream<Item = std::result::Result<T, Status>> + Send + 'static>>;
|
||||||
|
|
||||||
#[tonic::async_trait]
|
#[tonic::async_trait]
|
||||||
impl pb::TestService for TestService {
|
impl tonic_interop::pb::TestService for TestService {
|
||||||
async fn empty_call(&self, _request: Request<Empty>) -> Result<Empty> {
|
async fn empty_call(&self, _request: Request<Empty>) -> Result<Empty> {
|
||||||
println!("empty_call");
|
println!("empty_call");
|
||||||
Ok(Response::new(Empty {}))
|
Ok(Response::new(Empty {}))
|
||||||
@@ -46,8 +39,8 @@ impl pb::TestService for TestService {
|
|||||||
return Err(status);
|
return Err(status);
|
||||||
};
|
};
|
||||||
|
|
||||||
let res = pb::SimpleResponse {
|
let res = SimpleResponse {
|
||||||
payload: Some(pb::Payload {
|
payload: Some(Payload {
|
||||||
body: vec![0; res_size],
|
body: vec![0; res_size],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user