Allocate packages with higher functions capacity.

This commit is contained in:
Stephen Chung
2020-05-13 19:39:34 +08:00
parent 30e5e2f034
commit 5a02548ebc
6 changed files with 24 additions and 10 deletions

View File

@@ -1,5 +1,4 @@
use rhai::{packages::*, Engine, EvalAltResult, INT};
use std::rc::Rc;
fn main() -> Result<(), Box<EvalAltResult>> {
let mut engine = Engine::new_raw();

View File

@@ -1,12 +1,9 @@
use rhai::{Dynamic, Engine, EvalAltResult, Scope, AST, INT};
use rhai::{Dynamic, Engine, EvalAltResult, Scope, AST};
#[cfg(not(feature = "no_optimize"))]
use rhai::OptimizationLevel;
use std::{
io::{stdin, stdout, Write},
iter,
};
use std::io::{stdin, stdout, Write};
fn print_error(input: &str, err: EvalAltResult) {
let lines: Vec<_> = input.trim().split('\n').collect();

View File

@@ -3,7 +3,7 @@ use rhai::{Engine, EvalAltResult};
#[cfg(not(feature = "no_optimize"))]
use rhai::OptimizationLevel;
use std::{env, fs::File, io::Read, iter, process::exit};
use std::{env, fs::File, io::Read, process::exit};
fn eprint_error(input: &str, err: EvalAltResult) {
fn eprint_line(lines: &[&str], line: usize, pos: usize, err: &str) {