Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 764c137

Browse files
committedSep 22, 2017
Fix a few warnings.
1 parent f5cbcde commit 764c137

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed
 

‎src/socket/tcp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ impl<'a> TcpSocket<'a> {
13751375
(Some(remote_last_ts), Some(timeout))
13761376
if !self.tx_buffer.is_empty() =>
13771377
Some(remote_last_ts + timeout),
1378-
(None, Some(timeout)) =>
1378+
(None, Some(_timeout)) =>
13791379
Some(0),
13801380
(_, _) =>
13811381
None

‎src/storage/assembler.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ impl Assembler {
152152
while index != self.contigs.len() && size != 0 {
153153
let contig = self.contigs[index];
154154

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.