Replace try! macro
This commit is contained in:
@@ -122,9 +122,9 @@ fn prime_field_repr_impl(repr: &syn::Ident, limbs: usize) -> proc_macro2::TokenS
|
|||||||
impl ::std::fmt::Debug for #repr
|
impl ::std::fmt::Debug for #repr
|
||||||
{
|
{
|
||||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
try!(write!(f, "0x"));
|
write!(f, "0x")?;
|
||||||
for i in self.0.iter().rev() {
|
for i in self.0.iter().rev() {
|
||||||
try!(write!(f, "{:016x}", *i));
|
write!(f, "{:016x}", *i)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@@ -133,9 +133,9 @@ fn prime_field_repr_impl(repr: &syn::Ident, limbs: usize) -> proc_macro2::TokenS
|
|||||||
|
|
||||||
impl ::std::fmt::Display for #repr {
|
impl ::std::fmt::Display for #repr {
|
||||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
try!(write!(f, "0x"));
|
write!(f, "0x")?;
|
||||||
for i in self.0.iter().rev() {
|
for i in self.0.iter().rev() {
|
||||||
try!(write!(f, "{:016x}", *i));
|
write!(f, "{:016x}", *i)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ pub struct FsRepr(pub [u64; 4]);
|
|||||||
|
|
||||||
impl ::std::fmt::Display for FsRepr {
|
impl ::std::fmt::Display for FsRepr {
|
||||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||||
r#try!(write!(f, "0x"));
|
r#write!(f, "0x")?;
|
||||||
for i in self.0.iter().rev() {
|
for i in self.0.iter().rev() {
|
||||||
r#try!(write!(f, "{:016x}", *i));
|
r#write!(f, "{:016x}", *i)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
Reference in New Issue
Block a user