Macro fire_postgres::try_vec

source ·
macro_rules! try_vec {
    ($exp:expr) => { ... };
}
Expand description

§Example


fn add(maybe_vec: Option<Vec<i32>>) -> Result<Vec<i32>, &'static str> {
	let v = try_vec!(maybe_vec);

	Ok(v.into_iter().map(|x| x + 1).collect())
}