Skip to content

Commit ea3fb64

Browse files
committed
rename exec to dispatch
1 parent 6b4c34a commit ea3fb64

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/chunked/encoder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ impl ChunkedEncoder {
7272
buf: &mut [u8],
7373
) -> Poll<io::Result<usize>> {
7474
self.bytes_written = 0;
75-
let res = self.exec(res, cx, buf);
75+
let res = self.dispatch(res, cx, buf);
7676
log::trace!("ChunkedEncoder {} bytes written", self.bytes_written);
7777
res
7878
}
7979

8080
/// Execute the right method for the current state.
81-
fn exec(
81+
fn dispatch(
8282
&mut self,
8383
res: &mut Response,
8484
cx: &mut Context<'_>,
@@ -118,7 +118,7 @@ impl ChunkedEncoder {
118118
}
119119

120120
self.state = state;
121-
self.exec(res, cx, buf)
121+
self.dispatch(res, cx, buf)
122122
}
123123

124124
/// Stream out data using chunked encoding.

src/server/encode.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Read for Encoder {
6060
buf: &mut [u8],
6161
) -> Poll<io::Result<usize>> {
6262
self.bytes_written = 0;
63-
let res = self.exec(cx, buf);
63+
let res = self.dispatch(cx, buf);
6464
log::trace!("ServerEncoder {} bytes written", self.bytes_written);
6565
res
6666
}
@@ -103,11 +103,11 @@ impl Encoder {
103103
}
104104

105105
self.state = state;
106-
self.exec(cx, buf)
106+
self.dispatch(cx, buf)
107107
}
108108

109109
/// Execute the right method for the current state.
110-
fn exec(&mut self, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll<io::Result<usize>> {
110+
fn dispatch(&mut self, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll<io::Result<usize>> {
111111
match self.state {
112112
State::Start => self.set_state(State::ComputeHead, cx, buf),
113113
State::ComputeHead => self.compute_head(cx, buf),

0 commit comments

Comments
 (0)