fix: Typo in transfer validation
This commit is contained in:
parent
03d7f08e63
commit
ad3bbd3649
|
@ -131,10 +131,8 @@ impl TransferRegion {
|
|||
pub fn calculate_map(&self) -> Box<dyn Fn(Well) -> Option<Vec<Well>> + '_> {
|
||||
// By validating first, we have a stronger guarantee that
|
||||
// this function will not panic. :)
|
||||
// log::debug!("Validating: {:?}", self.validate());
|
||||
if let Err(msg) = self.validate() {
|
||||
eprintln!("{}", msg);
|
||||
eprintln!("This transfer will be empty.");
|
||||
log::error!("{}\nThis transfer will be empty.", msg);
|
||||
return Box::new(|_| None);
|
||||
}
|
||||
|
||||
|
@ -308,11 +306,15 @@ impl TransferRegion {
|
|||
// log::debug!("s1.1: {}, max.1: {}", s1.1, source_max.1);
|
||||
return Err("Source region is out-of-bounds! (Too wide)");
|
||||
}
|
||||
|
||||
if il_dest == (0,0) {
|
||||
return Err("Refusing to pool both dimensions in a rectangular transfer!\nPlease select a point in the destination plate.")
|
||||
}
|
||||
}
|
||||
Region::Custom(_) => return Ok(()),
|
||||
}
|
||||
|
||||
if il_source.0 == 0 || il_dest.1 == 0 {
|
||||
if il_source.0 == 0 || il_source.1 == 0 {
|
||||
return Err("Source interleave cannot be zero!");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue