projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8836e8
)
common: Use slice.swap() to clean up SectorHeaderIter::sort().
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 12 Jan 2020 09:41:40 +0000
(10:41 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 12 Jan 2020 12:03:49 +0000
(13:03 +0100)
src/common/logger.rs
patch
|
blob
|
history
diff --git
a/src/common/logger.rs
b/src/common/logger.rs
index 022b155f7d1b90b9667d5291dd4b8da9115b5dbb..95f4a4342a1f0320f76a98b26d5909f217442663 100644
(file)
--- a/
src/common/logger.rs
+++ b/
src/common/logger.rs
@@
-252,9
+252,7
@@
impl<'a> SectorHeaderIter<'a> {
}
for i in (1..num_elts_to_sort).rev() {
- let t = self.indices[0];
- self.indices[0] = self.indices[i];
- self.indices[i] = t;
+ self.indices.swap(0, i);
downheap(&mut self.indices, 0, i - 1, self.sector_header);
}