From f38f21fe84bab36c53473b5e6716fa24ce865143 Mon Sep 17 00:00:00 2001 From: Myrddin Dundragon Date: Mon, 10 Mar 2025 11:48:53 -0400 Subject: [PATCH] [#1] weave::attempt was removed in favor of ?. The old try macro style fell out of favour a long time ago. As such it is time to bring this code forward to the new style. It was just doing the same thing in the macro call anyways. --- src/vector.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/vector.rs b/src/vector.rs index 83cb757..4810566 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -5,8 +5,6 @@ use std::fmt::{Error, Formatter, Debug, Display}; use std::ops::{Add, Sub, Mul, Div, Rem, Neg}; use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign}; -use weave::attempt; - use crate::zero::Zero; use crate::one::One; use crate::number::Number; @@ -550,12 +548,12 @@ macro_rules! define_vector // pretty up the printing. count = self.get_size(); - attempt!(write!(formatter, "<")); + write!(formatter, "<")?; $( - attempt!(write!(formatter, "{:?}", self.$field)); + write!(formatter, "{:?}", self.$field)?; if count > 0 { - attempt!(write!(formatter, ", ")); + write!(formatter, ", ")?; } count -= 1; )* @@ -575,12 +573,12 @@ macro_rules! define_vector // pretty up the printing. count = self.get_size(); - attempt!(write!(formatter, "<")); + write!(formatter, "<")?; $( - attempt!(write!(formatter, "{}", self.$field)); + write!(formatter, "{}", self.$field)?; if count > 1 { - attempt!(write!(formatter, ", ")); + write!(formatter, ", ")?; } count -= 1; )*