File tree Expand file tree Collapse file tree
crates/toml_edit/src/parser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,3 @@ include = [
2222
2323[profile .release ]
2424debug = 1
25-
26- [profile .dev ]
27- opt-level = 1
Original file line number Diff line number Diff line change @@ -98,10 +98,13 @@ pub(crate) mod prelude {
9898 current : usize ,
9999 }
100100
101+ #[ cfg( not( feature = "unbounded" ) ) ]
102+ const LIMIT : usize = 100 ;
103+
101104 #[ cfg( not( feature = "unbounded" ) ) ]
102105 impl RecursionCheck {
103106 pub ( crate ) fn check_depth ( depth : usize ) -> Result < ( ) , super :: error:: CustomError > {
104- if depth < 128 {
107+ if depth < LIMIT {
105108 Ok ( ( ) )
106109 } else {
107110 Err ( super :: error:: CustomError :: RecursionLimitExceeded )
@@ -113,7 +116,7 @@ pub(crate) mod prelude {
113116 input : & mut Input < ' _ > ,
114117 ) -> Result < Self , winnow:: error:: ErrMode < ContextError > > {
115118 self . current += 1 ;
116- if self . current < 128 {
119+ if self . current < LIMIT {
117120 Ok ( self )
118121 } else {
119122 Err ( winnow:: error:: ErrMode :: from_external_error (
You can’t perform that action at this time.
0 commit comments