[thin_shrink] remove some debug printlns
This commit is contained in:
parent
31abc468be
commit
fcf44d46b7
@ -4,8 +4,8 @@ use std::fs::OpenOptions;
|
|||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::os::unix::fs::OpenOptionsExt;
|
use std::os::unix::fs::OpenOptionsExt;
|
||||||
|
|
||||||
use crate::shrink::xml;
|
|
||||||
use crate::shrink::copier::{self, Region};
|
use crate::shrink::copier::{self, Region};
|
||||||
|
use crate::shrink::xml;
|
||||||
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
|
|
||||||
@ -306,11 +306,9 @@ fn remap(r: &BlockRange, remaps: &Vec<(BlockRange, BlockRange)>) -> Vec<BlockRan
|
|||||||
let mut index = index;
|
let mut index = index;
|
||||||
loop {
|
loop {
|
||||||
let (from, to) = &remaps[index];
|
let (from, to) = &remaps[index];
|
||||||
println!("from = {:?}", from);
|
|
||||||
|
|
||||||
// There may be a prefix that doesn't overlap with 'from'
|
// There may be a prefix that doesn't overlap with 'from'
|
||||||
if r.start < from.start {
|
if r.start < from.start {
|
||||||
println!("pushing prefix");
|
|
||||||
let len = u64::min(range_len(&r), from.start - r.start);
|
let len = u64::min(range_len(&r), from.start - r.start);
|
||||||
remap.push(r.start..(r.start + len));
|
remap.push(r.start..(r.start + len));
|
||||||
r = (r.start + len)..r.end;
|
r = (r.start + len)..r.end;
|
||||||
@ -322,12 +320,10 @@ fn remap(r: &BlockRange, remaps: &Vec<(BlockRange, BlockRange)>) -> Vec<BlockRan
|
|||||||
|
|
||||||
let to = (to.start + (r.start - from.start))..to.end;
|
let to = (to.start + (r.start - from.start))..to.end;
|
||||||
let from = r.start..from.end;
|
let from = r.start..from.end;
|
||||||
println!("to = {:?}", to);
|
|
||||||
let rlen = range_len(&r);
|
let rlen = range_len(&r);
|
||||||
let flen = range_len(&from);
|
let flen = range_len(&from);
|
||||||
|
|
||||||
let len = u64::min(rlen, flen);
|
let len = u64::min(rlen, flen);
|
||||||
println!("pushing overlap");
|
|
||||||
remap.push(to.start..(to.start + len));
|
remap.push(to.start..(to.start + len));
|
||||||
|
|
||||||
r = (r.start + len)..r.end;
|
r = (r.start + len)..r.end;
|
||||||
|
Loading…
Reference in New Issue
Block a user