File tree 1 file changed +6
-18
lines changed
tonic/src/transport/server
1 file changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -98,30 +98,18 @@ where
98
98
type Data = B :: Data ;
99
99
type Error = B :: Error ;
100
100
101
- fn poll_data (
101
+ fn poll_frame (
102
102
self : Pin < & mut Self > ,
103
103
cx : & mut Context < ' _ > ,
104
- ) -> Poll < Option < Result < Self :: Data , Self :: Error > > > {
105
- match self . project ( ) . inner . as_pin_mut ( ) {
106
- Some ( b) => b. poll_data ( cx) ,
107
- None => Poll :: Ready ( None ) ,
108
- }
104
+ ) -> Poll < Option < Result < http_body:: Frame < Self :: Data > , Self :: Error > > > {
105
+ Pin :: new ( & mut self . 0 ) . poll_frame ( cx)
109
106
}
110
107
111
- fn poll_trailers (
112
- self : Pin < & mut Self > ,
113
- cx : & mut Context < ' _ > ,
114
- ) -> Poll < Result < Option < http:: HeaderMap > , Self :: Error > > {
115
- match self . project ( ) . inner . as_pin_mut ( ) {
116
- Some ( b) => b. poll_trailers ( cx) ,
117
- None => Poll :: Ready ( Ok ( None ) ) ,
118
- }
108
+ fn size_hint ( & self ) -> http_body:: SizeHint {
109
+ self . 0 . size_hint ( )
119
110
}
120
111
121
112
fn is_end_stream ( & self ) -> bool {
122
- match & self . inner {
123
- Some ( b) => b. is_end_stream ( ) ,
124
- None => true ,
125
- }
113
+ self . body . is_end_stream ( )
126
114
}
127
115
}
You can’t perform that action at this time.
0 commit comments