mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-01-30 15:32:14 +00:00
Replace try! macro
This commit is contained in:
parent
7809711a81
commit
b35a819a09
@ -122,9 +122,9 @@ fn prime_field_repr_impl(repr: &syn::Ident, limbs: usize) -> proc_macro2::TokenS
|
||||
impl ::std::fmt::Debug for #repr
|
||||
{
|
||||
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() {
|
||||
try!(write!(f, "{:016x}", *i));
|
||||
write!(f, "{:016x}", *i)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
@ -133,9 +133,9 @@ fn prime_field_repr_impl(repr: &syn::Ident, limbs: usize) -> proc_macro2::TokenS
|
||||
|
||||
impl ::std::fmt::Display for #repr {
|
||||
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() {
|
||||
try!(write!(f, "{:016x}", *i));
|
||||
write!(f, "{:016x}", *i)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@ -75,9 +75,9 @@ pub struct FsRepr(pub [u64; 4]);
|
||||
|
||||
impl ::std::fmt::Display for FsRepr {
|
||||
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() {
|
||||
r#try!(write!(f, "{:016x}", *i));
|
||||
r#write!(f, "{:016x}", *i)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user