diff --git a/Cargo.lock b/Cargo.lock index b5b6126658..a4da3f260c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -509,7 +509,7 @@ dependencies = [ "gluon_vm 0.8.1", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", - "little-skeptic 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "little-skeptic 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -614,7 +614,7 @@ dependencies = [ "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "gluon 0.8.1", - "handlebars 1.0.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "handlebars 1.0.0-beta.4 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -726,7 +726,7 @@ dependencies = [ [[package]] name = "handlebars" -version = "1.0.0-beta.1" +version = "1.0.0-beta.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -734,9 +734,10 @@ dependencies = [ "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -898,7 +899,7 @@ dependencies = [ [[package]] name = "little-skeptic" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytecount 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -906,7 +907,7 @@ dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "handlebars 1.0.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", + "handlebars 1.0.0-beta.4 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2126,7 +2127,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" "checksum getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum handlebars 1.0.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5318857c4f09fcf07dd8cbb3169f0e48f1cd488397ec9f3239c89a6d3162efd2" +"checksum handlebars 1.0.0-beta.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2703b90b4bdf8caa04f9643ff4411d0dca1be7429a48ffa2910d69362d27bcee" "checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" "checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" "checksum hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)" = "34a590ca09d341e94cddf8e5af0bbccde205d5fbc2fa3c09dd67c7f85cea59d7" @@ -2143,7 +2144,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" "checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1" "checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16" -"checksum little-skeptic 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48721a28c2cb663665c7fb4bce9adfbcd097e39d6ec9c6e927021e902bdecba0" +"checksum little-skeptic 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d453efd0f8353af14e7f02c38f2f095764ee1cbeda7568186572aa7bbdc97005" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" diff --git a/Cargo.toml b/Cargo.toml index 31b18dbf44..bb1dc42702 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ tokio-core = "0.1" rand = { version = "0.4", optional = true } [build-dependencies] -little-skeptic = { version = "0.14.0", optional = true } +little-skeptic = { version = "0.15.0", optional = true } walkdir = { version = "2", optional = true } [dev-dependencies] diff --git a/doc/Cargo.toml b/doc/Cargo.toml index 06c83b633e..7932560b55 100644 --- a/doc/Cargo.toml +++ b/doc/Cargo.toml @@ -15,7 +15,7 @@ log = "0.4" env_logger = "0.5" walkdir = "1" failure = { version = "0.1", features = ["backtrace"] } -handlebars = "=1.0.0-beta.1" +handlebars = "1.0.0-beta.4" clap = "2.22.0" itertools = "0.7" structopt = "0.2" diff --git a/doc/src/lib.rs b/doc/src/lib.rs index 7ef9fcaa87..424a442b87 100644 --- a/doc/src/lib.rs +++ b/doc/src/lib.rs @@ -30,7 +30,7 @@ use failure::ResultExt; use itertools::Itertools; -use handlebars::{Handlebars, Helper, Output, RenderContext, RenderError}; +use handlebars::{Context, Handlebars, Helper, Output, RenderContext, RenderError}; use serde::Deserialize; @@ -243,13 +243,11 @@ fn handlebars() -> Result { fn module_link_helper( h: &Helper, _: &Handlebars, + context: &Context, rc: &mut RenderContext, out: &mut Output, ) -> ::std::result::Result<(), RenderError> { - let current_module = &rc.context().data()["name"] - .as_str() - .expect("name") - .to_string(); + let current_module = &context.data()["name"].as_str().expect("name").to_string(); let param = String::deserialize(h.param(0).unwrap().value())?; let index = rc.get_root_template_name().map(|s| &s[..]) == Some(INDEX_TEMPLATE); @@ -261,6 +259,7 @@ fn handlebars() -> Result { fn breadcrumbs( h: &Helper, _: &Handlebars, + _: &Context, _: &mut RenderContext, out: &mut Output, ) -> ::std::result::Result<(), RenderError> { @@ -289,13 +288,11 @@ fn handlebars() -> Result { fn style( _: &Helper, _: &Handlebars, - rc: &mut RenderContext, + context: &Context, + _: &mut RenderContext, out: &mut Output, ) -> ::std::result::Result<(), RenderError> { - let current_module = &rc.context().data()["name"] - .as_str() - .expect("name") - .to_string(); + let current_module = &context.data()["name"].as_str().expect("name").to_string(); let relative_path = current_module.split('.').map(|_| "../").format(""); out.write(&format!(r#" @@ -309,6 +306,7 @@ fn handlebars() -> Result { fn markdown( h: &Helper, _: &Handlebars, + _: &Context, _: &mut RenderContext, out: &mut Output, ) -> ::std::result::Result<(), RenderError> { @@ -340,6 +338,7 @@ fn handlebars() -> Result { fn markdown_first_paragraph( h: &Helper, _: &Handlebars, + _: &Context, _: &mut RenderContext, out: &mut Output, ) -> ::std::result::Result<(), RenderError> {