[#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.
This commit is contained in:
parent
c3f2bb7a23
commit
f38f21fe84
@ -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;
|
||||
)*
|
||||
|
Loading…
x
Reference in New Issue
Block a user