Fix unchecked try_from
This commit is contained in:
parent
a294cffd50
commit
61ac574b70
|
@ -69,11 +69,13 @@ pub fn SourcePlate(props: &SourcePlateProps) -> Html {
|
||||||
m_stat_handle.set(false);
|
m_stat_handle.set(false);
|
||||||
if let Some(ul) = *m_start_handle {
|
if let Some(ul) = *m_start_handle {
|
||||||
if let Some(br) = *m_end_handle {
|
if let Some(br) = *m_end_handle {
|
||||||
dispatch.set(NewTransferState {
|
if let Ok(rd) = RegionDisplay::try_from((ul.0, ul.1, br.0, br.1)) {
|
||||||
source_region: RegionDisplay::try_from((ul.0, ul.1, br.0, br.1)).expect(""),
|
dispatch.set(NewTransferState {
|
||||||
destination_region: current.destination_region.clone(),
|
source_region: rd,
|
||||||
interleave_x: current.interleave_x,
|
destination_region: current.destination_region.clone(),
|
||||||
interleave_y: current.interleave_y })
|
interleave_x: current.interleave_x,
|
||||||
|
interleave_y: current.interleave_y })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue