Reduces maximal stack size

Crashes on GitHub CI and is likely to crash on other systems too
pull/190/head
Tpt 3 years ago
parent 842dc5fd75
commit 986e90845a
  1. 2
      lib/oxrdf/src/parser.rs
  2. 2
      lib/sparesults/src/json.rs

@ -10,7 +10,7 @@ use std::str::{Chars, FromStr};
/// This limit is set in order to avoid stack overflow error when parsing nested triples due to too many recursive calls.
/// The actual limit value is a wet finger compromise between not failing to parse valid files and avoiding to trigger stack overflow errors.
const MAX_NUMBER_OF_NESTED_TRIPLES: usize = 512;
const MAX_NUMBER_OF_NESTED_TRIPLES: usize = 128;
impl FromStr for NamedNode {
type Err = TermParseError;

@ -10,7 +10,7 @@ use std::io::{self, BufRead, Write};
/// This limit is set in order to avoid stack overflow error when parsing nested triples due to too many recursive calls.
/// The actual limit value is a wet finger compromise between not failing to parse valid files and avoiding to trigger stack overflow errors.
const MAX_NUMBER_OF_NESTED_TRIPLES: usize = 256;
const MAX_NUMBER_OF_NESTED_TRIPLES: usize = 128;
pub fn write_boolean_json_result<W: Write>(sink: W, value: bool) -> io::Result<W> {
let mut writer = JsonWriter::from_writer(sink);

Loading…
Cancel
Save