Skip to content

Commit

Permalink
perf(dubbo): Rename some variables and function names(#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdachiAndShimamura committed Aug 24, 2023
1 parent 8133afc commit 3a04088
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dubbo/src/triple/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub struct Decoding<T> {
#[derive(PartialEq)]
enum State {
ReadHeader,
ReadTriple,
ReadHttpBody,
ReadBody { len: usize, is_compressed: bool },
Error,
}
Expand Down Expand Up @@ -98,12 +98,12 @@ impl<T> Decoding<T> {
trailer.map(|data| data.map(Metadata::from_headers))
}

pub fn decode_triple(&mut self) -> Result<Option<T>, crate::status::Status> {
pub fn decode_http(&mut self) -> Result<Option<T>, crate::status::Status> {
if self.state == State::ReadHeader {
self.state = State::ReadTriple;
self.state = State::ReadHttpBody;
return Ok(None);
}
if let State::ReadTriple = self.state {
if let State::ReadHttpBody = self.state {
if self.buf.is_empty() {
return Ok(None);
}
Expand Down Expand Up @@ -218,7 +218,7 @@ impl<T> Decoding<T> {
if self.is_grpc {
self.decode_grpc()
} else {
self.decode_triple()
self.decode_http()
}
}
}
Expand Down

0 comments on commit 3a04088

Please sign in to comment.