fn outpoint_from_input_info(input: &InputInfo) -> OutPoint {
	let prevout: Option<OutPoint> = input.prevout.as_ref().map(
		|ref op| op.parse().expect("invalid prevout format")
	);
	let txid = input.txid;
	let vout = input.vout;

	match (prevout, txid, vout) {
		(Some(p), Some(t), _) if t != p.txid => panic!("prevout and txid don't match"),
		(Some(p), _, Some(v)) if v != p.vout => panic!("prevout and vout don't match"),
		(Some(p), _, _) => p,
		(None, Some(t), Some(v)) => OutPoint::new(t, v),
		_ => panic!("inputs should specify either the prevout or both the txid and vout"),
	}
}
/// Check both ways to specify the outpoint and panic if conflicting.
Check both ways to specify the outpoint and panic if conflicting.
Check both ways to specify the outpoint and panic if conflicting .
fn outpoint_from_input_info(input: &InputInfo) -> OutPoint {
	let prevout: Option<OutPoint> = input.prevout.as_ref().map(
		|ref op| op.parse().expect("invalid prevout format")
	);
	let txid = input.txid;
	let vout = input.vout;
	match (prevout, txid, vout) {
		(Some(p), Some(t), _) if t != p.txid => panic!("prevout and txid don't match"),
		(Some(p), _, Some(v)) if v != p.vout => panic!("prevout and vout don't match"),
		(Some(p), _, _) => p,
		(None, Some(t), Some(v)) => OutPoint::new(t, v),
		_ => panic!("inputs should specify either the prevout or both the txid and vout"),
	}
}
fn outpoint_from_input_info ( input : & InputInfo ) -> OutPoint { let prevout : Option < OutPoint > = input . prevout . as_ref ( ) . map ( | ref op | op . parse ( ) . expect ( " " ) ) ; let txid = input . txid ; let vout = input . vout ; match ( prevout , txid , vout ) { ( Some ( p ) , Some ( t ) , _ ) if t != p . txid => panic ! ( " " ) , ( Some ( p ) , _ , Some ( v ) ) if v != p . vout => panic ! ( " " ) , ( Some ( p ) , _ , _ ) => p , ( None , Some ( t ) , Some ( v ) ) => OutPoint :: new ( t , v ) , _ => panic ! ( " " ) , } }
Check both ways to specify the outpoint and panic if conflicting.
Check both ways to specify the outpoint and panic if conflicting .
input
&InputInfo
input
&InputInfo