Skip to content

Commit c9311ef

Browse files
committed
Use brace not parenth fo macro arm
Macro match arms can use any parenthesis-like character (it seems), however since we are delimiting a block of code elect to use braces.
1 parent db8060a commit c9311ef

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/consensus/encode.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ pub struct CheckedData(pub Vec<u8>);
334334

335335
// Primitive types
336336
macro_rules! impl_int_encodable {
337-
($ty:ident, $meth_dec:ident, $meth_enc:ident) => (
337+
($ty:ident, $meth_dec:ident, $meth_enc:ident) => {
338338
impl Decodable for $ty {
339339
#[inline]
340340
fn consensus_decode<D: io::Read>(mut d: D) -> Result<Self, Error> {
@@ -348,7 +348,7 @@ macro_rules! impl_int_encodable {
348348
Ok(mem::size_of::<$ty>())
349349
}
350350
}
351-
)
351+
}
352352
}
353353

354354
impl_int_encodable!(u8, read_u8, emit_u8);
@@ -494,7 +494,7 @@ impl Decodable for Cow<'static, str> {
494494

495495
// Arrays
496496
macro_rules! impl_array {
497-
( $size:expr ) => (
497+
( $size:expr ) => {
498498
impl Encodable for [u8; $size] {
499499
#[inline]
500500
fn consensus_encode<S: WriteExt>(&self, mut s: S) -> Result<usize, io::Error> {
@@ -511,7 +511,7 @@ macro_rules! impl_array {
511511
Ok(ret)
512512
}
513513
}
514-
);
514+
};
515515
}
516516

517517
impl_array!(2);
@@ -702,7 +702,7 @@ impl<T: Encodable> Encodable for sync::Arc<T> {
702702

703703
// Tuples
704704
macro_rules! tuple_encode {
705-
($($x:ident),*) => (
705+
($($x:ident),*) => {
706706
impl <$($x: Encodable),*> Encodable for ($($x),*) {
707707
#[inline]
708708
#[allow(non_snake_case)]
@@ -724,7 +724,7 @@ macro_rules! tuple_encode {
724724
Ok(($({let $x = Decodable::consensus_decode(&mut d)?; $x }),*))
725725
}
726726
}
727-
);
727+
};
728728
}
729729

730730
tuple_encode!(T0, T1);

src/util/uint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//!
2020
2121
macro_rules! construct_uint {
22-
($name:ident, $n_words:expr) => (
22+
($name:ident, $n_words:expr) => {
2323
/// Little-endian large integer type
2424
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default)]
2525
pub struct $name(pub [u64; $n_words]);
@@ -505,7 +505,7 @@ macro_rules! construct_uint {
505505
}
506506
}
507507
}
508-
);
508+
};
509509
}
510510

511511
construct_uint!(Uint256, 4);

0 commit comments

Comments
 (0)