Skip to content

Commit

Permalink
Simplify bcodec decode (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzau13 committed Jul 20, 2020
1 parent 8d0bd7c commit 5d6d309
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions actix-codec/CHANGES.md
Expand Up @@ -4,6 +4,7 @@
* Use `.advance()` instead of `.split_to()`.
* Upgrade `tokio-util` to `0.3`.
* Improve `BytesCodec` `.encode()` performance
* Simplify `BytesCodec` `.decode()`

## [0.2.0] - 2019-12-10

Expand Down
3 changes: 1 addition & 2 deletions actix-codec/src/bcodec.rs
Expand Up @@ -27,8 +27,7 @@ impl Decoder for BytesCodec {
if src.is_empty() {
Ok(None)
} else {
let len = src.len();
Ok(Some(src.split_to(len)))
Ok(Some(src.split()))
}
}
}

0 comments on commit 5d6d309

Please sign in to comment.