Skip to content

Commit b278b81

Browse files
committed
allow endding commas
1 parent a6cfc78 commit b278b81

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lazy-static-include"
3-
version = "1.2.1"
3+
version = "1.2.2"
44
authors = ["Magic Len <len@magiclen.org>"]
55
repository = "https://github.com/magiclen/lazy-static-include"
66
homepage = "https://magiclen.org/lazy-static-include"

src/macro_include_array.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -772,42 +772,42 @@ macro_rules! lazy_static_include_array_inner {
772772

773773
#[macro_export]
774774
macro_rules! lazy_static_include_array {
775-
( $name:ident: [&'static str; $s:expr], $path:expr ) => {
775+
( $name:ident: [&'static str; $s:expr], $path:expr $(,)* ) => {
776776
lazy_static! {
777777
static ref $name: [&'static str; $s] = lazy_static_include_array_inner!($name: [&'static str; $s], $path);
778778
}
779779
};
780-
( $name:ident: [&'static str; $s:expr], $path:expr, $($paths:expr), + ) => {
780+
( $name:ident: [&'static str; $s:expr], $path:expr, $($paths:expr), + $(,)* ) => {
781781
lazy_static! {
782782
static ref $name: Vec<[&'static str; $s]> = lazy_static_include_array_inner!($name: [&'static str; $s], $path $(, $paths)+);
783783
}
784784
};
785-
( pub $name:ident: [&'static str; $s:expr], $path:expr ) => {
785+
( pub $name:ident: [&'static str; $s:expr], $path:expr $(,)* ) => {
786786
lazy_static! {
787787
pub static ref $name: [&'static str; $s] = lazy_static_include_array_inner!($name: [&'static str; $s], $path);
788788
}
789789
};
790-
( pub $name:ident: [&'static str; $s:expr], $path:expr, $($paths:expr), + ) => {
790+
( pub $name:ident: [&'static str; $s:expr], $path:expr, $($paths:expr), + $(,)* ) => {
791791
lazy_static! {
792792
pub static ref $name: Vec<[&'static str; $s]> = lazy_static_include_array_inner!($name: [&'static str; $s], $path $(, $paths)+);
793793
}
794794
};
795-
( $name:ident: [$t:ident; $s:expr], $path:expr ) => {
795+
( $name:ident: [$t:ident; $s:expr], $path:expr $(,)* ) => {
796796
lazy_static! {
797797
static ref $name: [$t; $s] = lazy_static_include_array_inner!($name: [$t; $s], $path);
798798
}
799799
};
800-
( $name:ident: [$t:ident; $s:expr], $path:expr, $($paths:expr), + ) => {
800+
( $name:ident: [$t:ident; $s:expr], $path:expr, $($paths:expr), + $(,)* ) => {
801801
lazy_static! {
802802
static ref $name: Vec<[$t; $s]> = lazy_static_include_array_inner!($name: [$t; $s], $path $(, $paths)+);
803803
}
804804
};
805-
( pub $name:ident: [$t:ident; $s:expr], $path:expr ) => {
805+
( pub $name:ident: [$t:ident; $s:expr], $path:expr $(,)* ) => {
806806
lazy_static! {
807807
pub static ref $name: [$t; $s] = lazy_static_include_array_inner!($name: [$t; $s], $path);
808808
}
809809
};
810-
( pub $name:ident: [$t:ident; $s:expr], $path:expr, $($paths:expr), + ) => {
810+
( pub $name:ident: [$t:ident; $s:expr], $path:expr, $($paths:expr), + $(,)* ) => {
811811
lazy_static! {
812812
pub static ref $name: Vec<[$t; $s]> = lazy_static_include_array_inner!($name: [$t; $s], $path $(, $paths)+);
813813
}
@@ -816,22 +816,22 @@ macro_rules! lazy_static_include_array {
816816

817817
#[macro_export]
818818
macro_rules! lazy_static_include_array_vec {
819-
( $name:ident: [&'static str; $s:expr] $(, $paths:expr)+ ) => {
819+
( $name:ident: [&'static str; $s:expr] $(, $paths:expr)+ $(,)* ) => {
820820
lazy_static! {
821821
static ref $name: Vec<[&'static str; $s]> = lazy_static_include_array_inner!($name: [&'static str; $s], Vec $(, $paths)+);
822822
}
823823
};
824-
( pub $name:ident: [&'static str; $s:expr], $($paths:expr), + ) => {
824+
( pub $name:ident: [&'static str; $s:expr], $($paths:expr), + $(,)* ) => {
825825
lazy_static! {
826826
pub static ref $name: Vec<[&'static str; $s]> = lazy_static_include_array_inner!($name: [&'static str; $s], Vec $(, $paths)+);
827827
}
828828
};
829-
( $name:ident: [$t:ident; $s:expr], $($paths:expr), + ) => {
829+
( $name:ident: [$t:ident; $s:expr], $($paths:expr), + $(,)* ) => {
830830
lazy_static! {
831831
static ref $name: Vec<[$t; $s]> = lazy_static_include_array_inner!($name: [$t; $s], Vec $(, $paths)+);
832832
}
833833
};
834-
( pub $name:ident: [$t:ident; $s:expr], $($paths:expr), + ) => {
834+
( pub $name:ident: [$t:ident; $s:expr], $($paths:expr), + $(,)* ) => {
835835
lazy_static! {
836836
pub static ref $name: Vec<[$t; $s]> = lazy_static_include_array_inner!($name: [$t; $s], Vec $(, $paths)+);
837837
}

src/macro_include_bytes.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,28 +212,28 @@ macro_rules! lazy_static_include_bytes_inner {
212212

213213
#[macro_export]
214214
macro_rules! lazy_static_include_bytes {
215-
( $name:ident, $path:expr ) => {
215+
( $name:ident, $path:expr $(,)* ) => {
216216
lazy_static! {
217217
static ref $name: &'static [u8] = lazy_static_include_bytes_inner!($name, $path);
218218
}
219219

220220
lazy_static_include_bytes_impl!($name);
221221
};
222-
( $name:ident, $path:expr, $($paths:expr), + ) => {
222+
( $name:ident, $path:expr, $($paths:expr), + $(,)* ) => {
223223
lazy_static! {
224224
static ref $name: Vec<&'static [u8]> = lazy_static_include_bytes_inner!($name, $path $(, $paths)+);
225225
}
226226

227227
lazy_static_include_bytes_multiple_impl!($name);
228228
};
229-
( pub $name:ident, $path:expr ) => {
229+
( pub $name:ident, $path:expr $(,)* ) => {
230230
lazy_static! {
231231
pub static ref $name: &'static [u8] = lazy_static_include_bytes_inner!($name, $path);
232232
}
233233

234234
lazy_static_include_bytes_impl!($name);
235235
};
236-
( pub $name:ident, $path:expr, $($paths:expr), + ) => {
236+
( pub $name:ident, $path:expr, $($paths:expr), + $(,)* ) => {
237237
lazy_static! {
238238
static ref $name: Vec<&'static [u8]> = lazy_static_include_bytes_inner!($name, $path $(, $paths)+);
239239
}
@@ -244,14 +244,14 @@ macro_rules! lazy_static_include_bytes {
244244

245245
#[macro_export]
246246
macro_rules! lazy_static_include_bytes_vec {
247-
( $name:ident, $($paths:expr), + ) => {
247+
( $name:ident, $($paths:expr), + $(,)* ) => {
248248
lazy_static! {
249249
static ref $name: Vec<&'static [u8]> = lazy_static_include_bytes_inner!($name, Vec $(, $paths)+);
250250
}
251251

252252
lazy_static_include_bytes_multiple_impl!($name);
253253
};
254-
( pub $name:ident, $($paths:expr), + ) => {
254+
( pub $name:ident, $($paths:expr), + $(,)* ) => {
255255
lazy_static! {
256256
static ref $name: Vec<&'static [u8]> = lazy_static_include_bytes_inner!($name, Vec $(, $paths)+);
257257
}

src/macro_include_str.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,42 +236,42 @@ macro_rules! lazy_static_include_str_inner {
236236

237237
#[macro_export]
238238
macro_rules! lazy_static_include_str {
239-
( $name:ident, $path:expr ) => {
239+
( $name:ident, $path:expr $(,)* ) => {
240240
lazy_static! {
241241
static ref $name: &'static str = lazy_static_include_str_inner!($name, $path);
242242
}
243243

244244
lazy_static_include_str_impl!($name);
245245
};
246-
( $name:ident, Vec, $($paths:expr), + ) => {
246+
( $name:ident, Vec, $($paths:expr), + $(,)* ) => {
247247
lazy_static! {
248248
static ref $name: Vec<&'static str> = lazy_static_include_str_inner!($name, Vec $(, $paths)+);
249249
}
250250

251251
lazy_static_include_str_multiple_impl!($name);
252252
};
253-
( $name:ident, $path:expr, $($paths:expr), + ) => {
253+
( $name:ident, $path:expr, $($paths:expr), + $(,)* ) => {
254254
lazy_static! {
255255
static ref $name: Vec<&'static str> = lazy_static_include_str_inner!($name, $path $(, $paths)+);
256256
}
257257

258258
lazy_static_include_str_multiple_impl!($name);
259259
};
260-
( pub $name:ident, $path:expr ) => {
260+
( pub $name:ident, $path:expr $(,)* ) => {
261261
lazy_static! {
262262
pub static ref $name: &'static str = lazy_static_include_str_inner!($name, $path);
263263
}
264264

265265
lazy_static_include_str_impl!($name);
266266
};
267-
( pub $name:ident, Vec, $($paths:expr), + ) => {
267+
( pub $name:ident, Vec, $($paths:expr), + $(,)* ) => {
268268
lazy_static! {
269269
static ref $name: Vec<&'static str> = lazy_static_include_str_inner!($name, Vec $(, $paths)+);
270270
}
271271

272272
lazy_static_include_str_multiple_impl!($name);
273273
};
274-
( pub $name:ident, $path:expr, $($paths:expr), + ) => {
274+
( pub $name:ident, $path:expr, $($paths:expr), + $(,)* ) => {
275275
lazy_static! {
276276
static ref $name: Vec<&'static str> = lazy_static_include_str_inner!($name, $path $(, $paths)+);
277277
}
@@ -282,14 +282,14 @@ macro_rules! lazy_static_include_str {
282282

283283
#[macro_export]
284284
macro_rules! lazy_static_include_str_vec {
285-
( $name:ident, $($paths:expr), + ) => {
285+
( $name:ident, $($paths:expr), + $(,)* ) => {
286286
lazy_static! {
287287
static ref $name: Vec<&'static str> = lazy_static_include_str_inner!($name, Vec $(, $paths)+);
288288
}
289289

290290
lazy_static_include_str_multiple_impl!($name);
291291
};
292-
( pub $name:ident, $($paths:expr), + ) => {
292+
( pub $name:ident, $($paths:expr), + $(,)* ) => {
293293
lazy_static! {
294294
static ref $name: Vec<&'static str> = lazy_static_include_str_inner!($name, Vec $(, $paths)+);
295295
}

0 commit comments

Comments
 (0)