Skip to content

Commit 2431e0d

Browse files
committed
temporarily deprecate include_array, update categories
1 parent b278b81 commit 2431e0d

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "lazy-static-include"
3-
version = "1.2.2"
3+
version = "1.3.0"
44
authors = ["Magic Len <len@magiclen.org>"]
55
repository = "https://github.com/magiclen/lazy-static-include"
66
homepage = "https://magiclen.org/lazy-static-include"
77
keywords = ["lazy", "macro", "static", "include"]
8-
categories = ["memory-management"]
8+
categories = ["no-std", "memory-management", "rust-patterns"]
99
description= "This crate provides `lazy_static_include_bytes` and `lazy_static_include_str` macros to replace `include_bytes` and `include_str` macros."
1010
readme = "README.md"
1111
license = "MIT"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ lazy_static_include_str!(TEST, "data/test.txt", "data/test-2.txt");
6565
let v: &Vec<&'static str> = &*TEST;
6666
```
6767

68-
## Include Array
68+
## Include Array (temporarily deprecated)
6969

7070
There is a special macro `lazy_static_include_array` which can include arrays from files.
7171
The array is fixed sized and can be one of these following types: `bool`, `char`, `u8`, `u16`, `u32`, `u64`, `u128`, `i8`, `i16`, `i32`, `i64`, `i128`, `f32`, `f64`, `&'static str`.

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ You can run the benchmark program by executing,
146146
cargo bench
147147
```
148148
*/
149+
#![no_std]
149150

150151
mod macro_include_counter;
151152
mod macro_include_str;

src/macro_include_array.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,44 +771,53 @@ macro_rules! lazy_static_include_array_inner {
771771
}
772772

773773
#[macro_export]
774+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
774775
macro_rules! lazy_static_include_array {
775776
( $name:ident: [&'static str; $s:expr], $path:expr $(,)* ) => {
776777
lazy_static! {
778+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
777779
static ref $name: [&'static str; $s] = lazy_static_include_array_inner!($name: [&'static str; $s], $path);
778780
}
779781
};
780782
( $name:ident: [&'static str; $s:expr], $path:expr, $($paths:expr), + $(,)* ) => {
781783
lazy_static! {
784+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
782785
static ref $name: Vec<[&'static str; $s]> = lazy_static_include_array_inner!($name: [&'static str; $s], $path $(, $paths)+);
783786
}
784787
};
785788
( pub $name:ident: [&'static str; $s:expr], $path:expr $(,)* ) => {
786789
lazy_static! {
790+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
787791
pub static ref $name: [&'static str; $s] = lazy_static_include_array_inner!($name: [&'static str; $s], $path);
788792
}
789793
};
790794
( pub $name:ident: [&'static str; $s:expr], $path:expr, $($paths:expr), + $(,)* ) => {
791795
lazy_static! {
796+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
792797
pub static ref $name: Vec<[&'static str; $s]> = lazy_static_include_array_inner!($name: [&'static str; $s], $path $(, $paths)+);
793798
}
794799
};
795800
( $name:ident: [$t:ident; $s:expr], $path:expr $(,)* ) => {
796801
lazy_static! {
802+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
797803
static ref $name: [$t; $s] = lazy_static_include_array_inner!($name: [$t; $s], $path);
798804
}
799805
};
800806
( $name:ident: [$t:ident; $s:expr], $path:expr, $($paths:expr), + $(,)* ) => {
801807
lazy_static! {
808+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
802809
static ref $name: Vec<[$t; $s]> = lazy_static_include_array_inner!($name: [$t; $s], $path $(, $paths)+);
803810
}
804811
};
805812
( pub $name:ident: [$t:ident; $s:expr], $path:expr $(,)* ) => {
806813
lazy_static! {
814+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
807815
pub static ref $name: [$t; $s] = lazy_static_include_array_inner!($name: [$t; $s], $path);
808816
}
809817
};
810818
( pub $name:ident: [$t:ident; $s:expr], $path:expr, $($paths:expr), + $(,)* ) => {
811819
lazy_static! {
820+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
812821
pub static ref $name: Vec<[$t; $s]> = lazy_static_include_array_inner!($name: [$t; $s], $path $(, $paths)+);
813822
}
814823
};
@@ -818,21 +827,25 @@ macro_rules! lazy_static_include_array {
818827
macro_rules! lazy_static_include_array_vec {
819828
( $name:ident: [&'static str; $s:expr] $(, $paths:expr)+ $(,)* ) => {
820829
lazy_static! {
830+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
821831
static ref $name: Vec<[&'static str; $s]> = lazy_static_include_array_inner!($name: [&'static str; $s], Vec $(, $paths)+);
822832
}
823833
};
824834
( pub $name:ident: [&'static str; $s:expr], $($paths:expr), + $(,)* ) => {
825835
lazy_static! {
836+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
826837
pub static ref $name: Vec<[&'static str; $s]> = lazy_static_include_array_inner!($name: [&'static str; $s], Vec $(, $paths)+);
827838
}
828839
};
829840
( $name:ident: [$t:ident; $s:expr], $($paths:expr), + $(,)* ) => {
830841
lazy_static! {
842+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
831843
static ref $name: Vec<[$t; $s]> = lazy_static_include_array_inner!($name: [$t; $s], Vec $(, $paths)+);
832844
}
833845
};
834846
( pub $name:ident: [$t:ident; $s:expr], $($paths:expr), + $(,)* ) => {
835847
lazy_static! {
848+
#[deprecated(since = "1.3.0", note = "extremely unstable, it should be implemented by the `syn` crate")]
836849
pub static ref $name: Vec<[$t; $s]> = lazy_static_include_array_inner!($name: [$t; $s], Vec $(, $paths)+);
837850
}
838851
};

0 commit comments

Comments
 (0)