Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a few warnings.
Browse files Browse the repository at this point in the history
whitequark committed Sep 22, 2017
1 parent f5cbcde commit 764c137
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/socket/tcp.rs
Original file line number Diff line number Diff line change
@@ -1375,7 +1375,7 @@ impl<'a> TcpSocket<'a> {
(Some(remote_last_ts), Some(timeout))
if !self.tx_buffer.is_empty() =>
Some(remote_last_ts + timeout),
(None, Some(timeout)) =>
(None, Some(_timeout)) =>
Some(0),
(_, _) =>
None
4 changes: 1 addition & 3 deletions src/storage/assembler.rs
Original file line number Diff line number Diff line change
@@ -152,7 +152,7 @@ impl Assembler {
while index != self.contigs.len() && size != 0 {
let contig = self.contigs[index];

if let Some(new_offset) = offset.checked_sub(contig.total_size()) {
if offset >= contig.total_size() {
// The range being added does not cover this contig, skip it.
index += 1;
} else if offset == 0 && size >= contig.hole_size && index > 0 {
@@ -207,10 +207,8 @@ impl Assembler {
if front.has_hole() {
None
} else {
println!("{}", self);{
let last_hole = self.remove_contig_at(0);
last_hole.hole_size += front.data_size;
}println!("{}", self);

debug_assert!(front.data_size > 0);
Some(front.data_size)

0 comments on commit 764c137

Please sign in to comment.