Skip to content

Commit 5d4c090

Browse files
committed
Add semicolons to macro invocations
If a macro expands to items, braces or a semicolon is now needed
1 parent 432bbee commit 5d4c090

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/sdl2/audio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ pub struct AudioCVT {
556556
owned: bool,
557557
}
558558

559-
impl_raw_accessors!(AudioCVT, *mut ll::SDL_AudioCVT)
560-
impl_owned_accessors!(AudioCVT, owned)
559+
impl_raw_accessors!(AudioCVT, *mut ll::SDL_AudioCVT);
560+
impl_owned_accessors!(AudioCVT, owned);
561561

562562
impl Drop for AudioCVT {
563563
fn drop(&mut self) {

src/sdl2/macros.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ macro_rules! impl_raw_accessors(
99
}
1010
)+
1111
)
12-
)
12+
);
1313

1414
macro_rules! impl_owned_accessors(
1515
($($t:ty, $owned:ident);+) => (
@@ -20,7 +20,7 @@ macro_rules! impl_owned_accessors(
2020
}
2121
)+
2222
)
23-
)
23+
);
2424

2525
macro_rules! impl_raw_constructor(
2626
($($t:ty -> $te:ident ($($r:ident:$rt:ty),+));+) => (
@@ -33,4 +33,4 @@ macro_rules! impl_raw_constructor(
3333
}
3434
)+
3535
)
36-
)
36+
);

src/sdl2/pixels.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub struct Palette {
9797
raw: *const ll::SDL_Palette
9898
}
9999

100-
impl_raw_accessors!(Palette, *const ll::SDL_Palette)
100+
impl_raw_accessors!(Palette, *const ll::SDL_Palette);
101101

102102
#[deriving(PartialEq, Clone, Copy)]
103103
pub enum Color {
@@ -149,8 +149,8 @@ pub struct PixelFormat {
149149
raw: *const ll::SDL_PixelFormat
150150
}
151151

152-
impl_raw_accessors!(PixelFormat, *const ll::SDL_PixelFormat)
153-
impl_raw_constructor!(PixelFormat -> PixelFormat (raw: *const ll::SDL_PixelFormat))
152+
impl_raw_accessors!(PixelFormat, *const ll::SDL_PixelFormat);
153+
impl_raw_constructor!(PixelFormat -> PixelFormat (raw: *const ll::SDL_PixelFormat));
154154

155155
#[deriving(Copy, Clone, PartialEq, Show, FromPrimitive)]
156156
pub enum PixelFormatFlag {

src/sdl2/rwops.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ pub struct RWops {
5252
close_on_drop: bool
5353
}
5454

55-
impl_raw_accessors!(RWops, *const ll::SDL_RWops)
56-
impl_owned_accessors!(RWops, close_on_drop)
55+
impl_raw_accessors!(RWops, *const ll::SDL_RWops);
56+
impl_owned_accessors!(RWops, close_on_drop);
5757

5858
/// A structure that provides an abstract interface to stream I/O.
5959
impl RWops {

src/sdl2/surface.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ impl Drop for Surface {
108108
}
109109
}
110110

111-
impl_raw_accessors!(Surface, *const ll::SDL_Surface)
112-
impl_owned_accessors!(Surface, owned)
113-
impl_raw_constructor!(Surface -> Surface (raw: *const ll::SDL_Surface, owned: bool))
111+
impl_raw_accessors!(Surface, *const ll::SDL_Surface);
112+
impl_owned_accessors!(Surface, owned);
113+
impl_raw_constructor!(Surface -> Surface (raw: *const ll::SDL_Surface, owned: bool));
114114

115115
impl Surface {
116116
pub fn new(surface_flags: SurfaceFlag, width: int, height: int, bpp: int,

src/sdl2/video.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,16 +343,16 @@ pub struct Window {
343343
impl_raw_accessors!(
344344
GLContext, ll::SDL_GLContext;
345345
Window, *const ll::SDL_Window
346-
)
346+
);
347347

348348
impl_owned_accessors!(
349349
GLContext, owned;
350350
Window, owned
351-
)
351+
);
352352

353353
impl_raw_constructor!(
354354
Window -> Window (raw: *const ll::SDL_Window, owned: bool)
355-
)
355+
);
356356

357357
impl Drop for Window {
358358
fn drop(&mut self) {

0 commit comments

Comments
 (0)