Skip to content

Commit bb6d2d0

Browse files
committed
build: Update rant to new version v4.0.0-alpha.29
1 parent 49f7e42 commit bb6d2d0

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ crate-type = ["cdylib"]
1010
[dependencies]
1111
wasm-bindgen = "0.2"
1212
getrandom = { version="*", features = ["js"] }
13-
rant = "4.0.0-alpha.28"
13+
rant = "4.0.0-alpha.29"

src/lib.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use std::{fmt, rc::Rc};
22

33
use rant::{
4-
compiler::{CompilerErrorKind, CompilerMessage},
4+
compiler::{CompilerError, CompilerMessage},
55
runtime::{RuntimeError, VM},
6-
AsRantFunction, Rant, RantOptions, RantValue,
6+
AsRantFunction, NoModuleResolver, Rant, RantOptions, RantValue,
77
};
88
use wasm_bindgen::prelude::*;
99

@@ -18,10 +18,9 @@ pub fn rant(input: &str, seed: u32) -> Result<String, JsValue> {
1818
fn _rant(input: &str, seed: u32) -> Result<RantValue, RantError> {
1919
let options = RantOptions {
2020
seed: seed.into(),
21-
enable_require: false,
2221
..Default::default()
2322
};
24-
let mut rant = Rant::with_options(options);
23+
let mut rant = Rant::with_options(options).using_module_resolver(NoModuleResolver);
2524
register_markdown_functions(&mut rant);
2625

2726
let mut msgs: Vec<CompilerMessage> = vec![];
@@ -83,7 +82,7 @@ impl fmt::Display for RantError {
8382

8483
#[derive(Debug)]
8584
struct CompilerErrorWithMsgs {
86-
err: CompilerErrorKind,
85+
err: CompilerError,
8786
msgs: Vec<CompilerMessage>,
8887
}
8988

0 commit comments

Comments
 (0)