nickel-org / rust-mustache

mustache template library for rust
Other
202 stars 61 forks source link

bug: render_utag: unexpected value VecVal([]) #72

Open MaulingMonkey opened 4 years ago

MaulingMonkey commented 4 years ago

I've created a minimal repro case to reproduce this panic, which requests I file an issue:

thread 'main' panicked at 'bug: render_utag: unexpected value VecVal([]). Please report this issue on GitHub if you find an input that triggers this case.', C:\Users\...\.cargo\registry\src\github.com-1ecc6299db9ec823\mustache-0.9.0\src\template.rs:224:25

Cargo.toml

[package]
name    = "mustache-bug-repo"
version = "0.1.0"
edition = "2018"

[dependencies]
mustache = "=0.9.0"

src/main.rs

fn main() {
    let template = mustache::compile_str("{{authors}}").unwrap();
    let data = mustache::MapBuilder::new()
        .insert_vec("authors", |v| v)
        .build();
    let r = template.render_data_to_string(&data).unwrap();
}