File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,12 @@ edition = "2024"
1515
1616[dependencies ]
1717serde = { version = " 1.0" , default-features = false }
18- erased-serde = " 0.4"
1918serde_derive = " 1.0"
19+ erased-serde = { version = " 0.4" , optional = true }
2020
2121[features ]
22- default = [" std" ]
22+ default = [" std" , " ser " ]
2323
24+ ser = [" dep:erased-serde" ]
2425std = [" serde/std" ]
2526alloc = [" serde/alloc" ]
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ extern crate alloc;
2020
2121pub mod de;
2222pub mod error;
23+ #[ cfg( feature = "ser" ) ]
2324pub mod ser;
2425pub mod utils;
2526pub mod value;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ pub enum Error {
7373}
7474
7575impl core:: fmt:: Display for Error {
76- fn fmt ( & self , formatter : & mut std :: fmt:: Formatter < ' _ > ) -> std :: fmt:: Result {
76+ fn fmt ( & self , formatter : & mut core :: fmt:: Formatter < ' _ > ) -> core :: fmt:: Result {
7777 write ! ( formatter, "{:?}" , self )
7878 }
7979}
@@ -83,7 +83,7 @@ impl core::error::Error for Error {}
8383impl serde:: ser:: Error for Error {
8484 fn custom < T > ( _msg : T ) -> Self
8585 where
86- T : std :: fmt:: Display ,
86+ T : core :: fmt:: Display ,
8787 {
8888 Self :: Unknown
8989 }
Original file line number Diff line number Diff line change 1- use super :: Error ;
21use super :: patch:: PatchList ;
32use super :: pointer:: Pointer ;
43use super :: string_block:: StringBlock ;
54use crate :: common:: * ;
5+ use crate :: ser:: Error ;
66
77#[ derive( Clone , Copy ) ]
88// The enum for current parsing type.
You can’t perform that action at this time.
0 commit comments