Merge pull request #1504 from matthiasbeyer/dependency-update

Dependency update
This commit is contained in:
Matthias Beyer 2018-09-27 16:36:49 +02:00 committed by GitHub
commit 01c5625706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 128 additions and 126 deletions

View file

@ -25,7 +25,7 @@ maintenance = { status = "actively-developed" }
log = "0.4.0"
url = "1.2"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }

View file

@ -24,7 +24,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }

View file

@ -18,8 +18,8 @@ build = "../../../build.rs"
[dependencies]
log = "0.4"
toml = "0.4"
toml-query = "0.6"
indicatif = "0.9"
toml-query = "0.7"
indicatif = "0.9"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }

View file

@ -25,7 +25,7 @@ maintenance = { status = "actively-developed" }
log = "0.3"
version = "2.0.1"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }

View file

@ -24,7 +24,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.3"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -25,7 +25,7 @@ maintenance = { status = "actively-developed" }
log = "0.4.0"
url = "1.2"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }

View file

@ -26,7 +26,7 @@ filters = "0.3"
nom = "3.2"
log = "0.4"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
is-match = "0.1"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -25,7 +25,7 @@ maintenance = { status = "actively-developed" }
log = "0.4.0"
url = "1.5"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
prettytable-rs = "0.6"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -24,7 +24,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.4"
error-chain = "0.11"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore", features = ["verify"] }
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }
@ -52,5 +52,5 @@ default-features = false
features = ["testing"]
[dev-dependencies.toml-query]
version = "0.4"
version = "0.7"

View file

@ -37,7 +37,7 @@ default-features = false
features = ["color", "suggestions", "wrap_help"]
[dev-dependencies]
toml-query = "0.6"
toml-query = "0.7"
env_logger = "0.5"
[dev-dependencies.libimagutil]

View file

@ -24,8 +24,8 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
handlebars = "0.29.0"
toml-query = "0.7"
handlebars = "1.0"
tempfile = "2.1"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -31,7 +31,7 @@ maintenance = { status = "actively-developed" }
walkdir = "1"
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
is-match = "0.1"
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }

View file

@ -24,7 +24,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -24,9 +24,9 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
handlebars = "0.29"
vobject = "0.4"
toml-query = "0.7"
vobject = { git = "https://github.com/matthiasbeyer/rust-vobject", branch = "update-errorchain" }
handlebars = "1.0"
walkdir = "1"
uuid = { version = "0.6", features = ["v4"] }
serde_json = "1"

View file

@ -39,6 +39,7 @@ use std::path::PathBuf;
use std::fs::OpenOptions;
use vobject::vcard::Vcard;
use vobject::vcard::VcardBuilder;
use vobject::write_component;
use toml_query::read::TomlValueReadExt;
use toml::Value;
@ -208,7 +209,7 @@ pub fn create(rt: &Runtime) {
}
fn parse_toml_into_vcard(toml: Value, uuid: String) -> Option<Vcard> {
let mut vcard = Vcard::default().with_uid(uuid);
let mut vcard = VcardBuilder::new().with_uid(uuid);
{ // parse name
debug!("Parsing name");
@ -448,6 +449,9 @@ fn parse_toml_into_vcard(toml: Value, uuid: String) -> Option<Vcard> {
}
let vcard = vcard
.build()
.unwrap(); // TODO: This unwrap does not fail with rust-vobject, why is there a Result<> returned?
Some(vcard)
}

View file

@ -25,7 +25,7 @@ maintenance = { status = "actively-developed" }
chrono = "0.4"
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
itertools = "0.7"
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -23,10 +23,10 @@ maintenance = { status = "actively-developed" }
[dependencies]
chrono = "0.4"
log = "0.3"
log = "0.4"
toml = "0.4"
toml-query = "0.6"
kairos = "0.1.0"
toml-query = "0.7"
kairos = { git = "https://github.com/matthiasbeyer/kairos", branch = "master" }
prettytable-rs = "0.6"
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -22,9 +22,9 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
log = "0.3"
log = "0.4"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
is-match = "0.1"
itertools = "0.7"

View file

@ -27,7 +27,7 @@ chrono = "0.4"
filters = "0.3"
itertools = "0.7"
prettytable-rs = "0.6"
kairos = "0.1"
kairos = { git = "https://github.com/matthiasbeyer/kairos", branch = "master" }
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }

View file

@ -24,7 +24,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
is-match = "0.1"
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }

View file

@ -17,9 +17,9 @@ build = "../../../build.rs"
[dependencies]
clap = ">=2.17"
log = "0.3"
log = "0.4"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
is-match = "0.1"
regex = "0.2"
filters = "0.3"

View file

@ -22,4 +22,4 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4"
ansi_term = "0.10"
error-chain = "0.11"
error-chain = "0.12"

View file

@ -26,9 +26,9 @@ xdg-basedir = "1.0"
itertools = "0.7"
ansi_term = "0.10"
is-match = "0.1"
toml-query = "0.6"
error-chain = "0.11"
handlebars = "0.29.0"
toml-query = "0.7"
error-chain = "0.12"
handlebars = "1.0"
atty = "0.2"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -29,8 +29,8 @@ walkdir = "1"
is-match = "0.1"
serde = "1"
serde_json = "1"
error-chain = "0.11"
toml-query = "0.6"
error-chain = "0.12"
toml-query = "0.7"
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }
libimagutil = { version = "0.9.0", path = "../../../lib/etc/libimagutil" }

View file

@ -22,7 +22,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
url = "1.5"
regex = "0.2"
error-chain = "0.11"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -20,11 +20,11 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
error-chain = "0.11"
error-chain = "0.12"
log = "0.3"
toml = "0.4"
toml-query = "0.6"
vobject = "0.5"
toml-query = "0.7"
vobject = { git = "https://github.com/matthiasbeyer/rust-vobject", branch = "update-errorchain" }
uuid = "0.6"
serde = "1"
serde_derive = "1"

View file

@ -23,9 +23,9 @@ maintenance = { status = "actively-developed" }
chrono = "0.4"
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
itertools = "0.7"
error-chain = "0.11"
error-chain = "0.12"
filters = "0.3"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -21,11 +21,11 @@ maintenance = { status = "actively-developed" }
[dependencies]
chrono = "0.4"
log = "0.3"
log = "0.4"
toml = "0.4"
toml-query = "0.6"
error-chain = "0.11"
kairos = "0.1.0"
toml-query = "0.7"
error-chain = "0.12"
kairos = { git = "https://github.com/matthiasbeyer/kairos", branch = "master" }
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -21,8 +21,8 @@ maintenance = { status = "actively-developed" }
[dependencies]
toml = "0.4"
toml-query = "0.6"
error-chain = "0.11"
toml-query = "0.7"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" }
log = "0.4.0"
email = "0.0.17"
filters = "0.3"
error-chain = "0.11"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -22,8 +22,8 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
error-chain = "0.11"
toml-query = "0.7"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -23,10 +23,10 @@ maintenance = { status = "actively-developed" }
filters = "0.3"
chrono = "0.4"
toml = "0.4"
toml-query = "0.6"
lazy_static = "0.2"
toml-query = "0.7"
lazy_static = "1"
is-match = "0.1"
error-chain = "0.11"
error-chain = "0.12"
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -23,10 +23,10 @@ maintenance = { status = "actively-developed" }
task-hookrs = "0.5"
uuid = "0.6"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
log = "0.4.0"
serde_json = "1"
error-chain = "0.11"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -21,9 +21,9 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4"
error-chain = "0.11"
error-chain = "0.12"
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
filters = "0.2"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -20,10 +20,10 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
lazy_static = "0.2"
lazy_static = "1"
toml = "0.4"
toml-query = "0.6"
error-chain = "0.11"
toml-query = "0.7"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -22,8 +22,8 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
error-chain = "0.11"
toml-query = "0.7"
error-chain = "0.12"
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -21,10 +21,10 @@ maintenance = { status = "actively-developed" }
[dependencies]
chrono = "0.4"
toml-query = "0.6"
lazy_static = "0.2"
toml-query = "0.7"
lazy_static = "1"
toml = "0.4"
error-chain = "0.11"
error-chain = "0.12"
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -20,7 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
error-chain = "0.11"
error-chain = "0.12"
toml = "0.4"
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -26,8 +26,8 @@ log = "0.4.0"
regex = "0.2"
semver = "0.8"
toml = "0.4"
toml-query = "0.6"
error-chain = "0.11"
toml-query = "0.7"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagentrytag = { version = "0.9.0", path = "../../../lib/entry/libimagentrytag" }

View file

@ -21,10 +21,10 @@ maintenance = { status = "actively-developed" }
[dependencies]
toml = "0.4"
toml-query = "0.6"
toml-query = "0.7"
serde_derive = "1"
serde = "1"
error-chain = "0.11"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -27,8 +27,8 @@ url = "1.5"
sha-1 = "0.7"
hex = "0.3"
is-match = "0.1"
toml-query = "0.6"
error-chain = "0.11"
toml-query = "0.7"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" }
log = "0.4.0"
hoedown = "6.0.0"
url = "1.5"
error-chain = "0.11"
error-chain = "0.12"
env_logger = "0.5"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -23,8 +23,8 @@ maintenance = { status = "actively-developed" }
itertools = "0.7"
log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
error-chain = "0.11"
toml-query = "0.7"
error-chain = "0.12"
sha-1 = { version = "0.7", optional = true }
sha2 = { version = "0.7", optional = true }
sha3 = { version = "0.7", optional = true }

View file

@ -26,8 +26,8 @@ toml = "0.4"
itertools = "0.7"
is-match = "0.1"
filters = "0.3"
toml-query = "0.6"
error-chain = "0.11"
toml-query = "0.7"
error-chain = "0.12"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -21,8 +21,8 @@ maintenance = { status = "actively-developed" }
[dependencies]
toml = "0.4"
toml-query = "0.6"
error-chain = "0.11"
toml-query = "0.7"
error-chain = "0.12"
filters = "0.3"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -22,7 +22,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.4"
error-chain = "0.11"
error-chain = "0.12"
textwrap = "0.9"
libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" }

View file

@ -22,12 +22,12 @@ maintenance = { status = "actively-developed" }
[dependencies]
ansi_term = "0.10"
interactor = "0.1"
lazy_static = "0.2"
lazy_static = "1"
log = "0.4.0"
regex = "0.2"
toml = "0.4"
error-chain = "0.11"
handlebars = "0.29.0"
error-chain = "0.12"
handlebars = "1.0"
serde_json = "1"
libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" }

View file

@ -17,7 +17,8 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
use handlebars::{Handlebars, HelperDef, JsonRender, RenderError, RenderContext, Helper};
use handlebars::{HelperDef, JsonRender, RenderError, RenderContext, Helper, Output, Context};
use handlebars::Handlebars as Registry;
use serde_json::value::Value;
use ansi_term::Colour;
use ansi_term::Style;
@ -26,8 +27,8 @@ use ansi_term::Style;
pub struct ColorizeBlackHelper;
impl HelperDef for ColorizeBlackHelper {
fn call(&self, h: &Helper, hb: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
colorize(Colour::Black, h, hb, rc)
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
colorize(Colour::Black, h, out)
}
}
@ -35,8 +36,8 @@ impl HelperDef for ColorizeBlackHelper {
pub struct ColorizeBlueHelper;
impl HelperDef for ColorizeBlueHelper {
fn call(&self, h: &Helper, hb: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
colorize(Colour::Blue, h, hb, rc)
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
colorize(Colour::Blue, h, out)
}
}
@ -44,8 +45,8 @@ impl HelperDef for ColorizeBlueHelper {
pub struct ColorizeCyanHelper;
impl HelperDef for ColorizeCyanHelper {
fn call(&self, h: &Helper, hb: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
colorize(Colour::Cyan, h, hb, rc)
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
colorize(Colour::Cyan, h, out)
}
}
@ -53,8 +54,8 @@ impl HelperDef for ColorizeCyanHelper {
pub struct ColorizeGreenHelper;
impl HelperDef for ColorizeGreenHelper {
fn call(&self, h: &Helper, hb: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
colorize(Colour::Green, h, hb, rc)
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
colorize(Colour::Green, h, out)
}
}
@ -62,8 +63,8 @@ impl HelperDef for ColorizeGreenHelper {
pub struct ColorizePurpleHelper;
impl HelperDef for ColorizePurpleHelper {
fn call(&self, h: &Helper, hb: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
colorize(Colour::Purple, h, hb, rc)
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
colorize(Colour::Purple, h, out)
}
}
@ -71,8 +72,8 @@ impl HelperDef for ColorizePurpleHelper {
pub struct ColorizeRedHelper;
impl HelperDef for ColorizeRedHelper {
fn call(&self, h: &Helper, hb: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
colorize(Colour::Red, h, hb, rc)
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
colorize(Colour::Red, h, out)
}
}
@ -80,8 +81,8 @@ impl HelperDef for ColorizeRedHelper {
pub struct ColorizeWhiteHelper;
impl HelperDef for ColorizeWhiteHelper {
fn call(&self, h: &Helper, hb: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
colorize(Colour::White, h, hb, rc)
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
colorize(Colour::White, h, out)
}
}
@ -89,15 +90,16 @@ impl HelperDef for ColorizeWhiteHelper {
pub struct ColorizeYellowHelper;
impl HelperDef for ColorizeYellowHelper {
fn call(&self, h: &Helper, hb: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
colorize(Colour::Yellow, h, hb, rc)
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
colorize(Colour::Yellow, h, out)
}
}
fn colorize(color: Colour, h: &Helper, _: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
#[inline]
fn colorize(color: Colour, h: &Helper, output: &mut Output) -> Result<(), RenderError> {
let p = h.param(0).ok_or(RenderError::new("Too few arguments"))?;
write!(rc.writer(), "{}", color.paint(p.value().render()))?;
output.write(&format!("{}", color.paint(p.value().render())))?;
Ok(())
}
@ -105,11 +107,10 @@ fn colorize(color: Colour, h: &Helper, _: &Handlebars, rc: &mut RenderContext) -
pub struct UnderlineHelper;
impl HelperDef for UnderlineHelper {
fn call(&self, h: &Helper, _: &Handlebars, rc: &mut RenderContext) -> Result<(),
RenderError> {
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
let p = h.param(0).ok_or(RenderError::new("Too few arguments"))?;
let s = Style::new().underline();
write!(rc.writer(), "{}", s.paint(p.value().render()))?;
out.write(&format!("{}", s.paint(p.value().render())))?;
Ok(())
}
}
@ -118,11 +119,10 @@ impl HelperDef for UnderlineHelper {
pub struct BoldHelper;
impl HelperDef for BoldHelper {
fn call(&self, h: &Helper, _: &Handlebars, rc: &mut RenderContext) -> Result<(),
RenderError> {
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
let p = h.param(0).ok_or(RenderError::new("Too few arguments"))?;
let s = Style::new().bold();
write!(rc.writer(), "{}", s.paint(p.value().render()))?;
out.write(&format!("{}", s.paint(p.value().render())))?;
Ok(())
}
}
@ -131,11 +131,10 @@ impl HelperDef for BoldHelper {
pub struct BlinkHelper;
impl HelperDef for BlinkHelper {
fn call(&self, h: &Helper, _: &Handlebars, rc: &mut RenderContext) -> Result<(),
RenderError> {
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
let p = h.param(0).ok_or(RenderError::new("Too few arguments"))?;
let s = Style::new().blink();
write!(rc.writer(), "{}", s.paint(p.value().render()))?;
out.write(&format!("{}", s.paint(p.value().render())))?;
Ok(())
}
}
@ -144,11 +143,10 @@ impl HelperDef for BlinkHelper {
pub struct StrikethroughHelper;
impl HelperDef for StrikethroughHelper {
fn call(&self, h: &Helper, _: &Handlebars, rc: &mut RenderContext) -> Result<(),
RenderError> {
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
let p = h.param(0).ok_or(RenderError::new("Too few arguments"))?;
let s = Style::new().strikethrough();
write!(rc.writer(), "{}", s.paint(p.value().render()))?;
out.write(&format!("{}", s.paint(p.value().render())))?;
Ok(())
}
}
@ -164,11 +162,11 @@ fn param_to_number(idx: usize, h: &Helper) -> Result<u64, RenderError> {
pub struct LeftPadHelper;
impl HelperDef for LeftPadHelper {
fn call(&self, h: &Helper, _: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
let count = param_to_number(0, h)? as usize;
let text = h.param(1).ok_or(RenderError::new("Too few arguments"))?;
let text = format!("{:>width$}", text.value().render(), width = count);
write!(rc.writer(), "{}", text)?;
out.write(&text)?;
Ok(())
}
}
@ -177,11 +175,11 @@ impl HelperDef for LeftPadHelper {
pub struct RightPadHelper;
impl HelperDef for RightPadHelper {
fn call(&self, h: &Helper, _: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
let count = param_to_number(0, h)? as usize;
let text = h.param(1).ok_or(RenderError::new("Too few arguments"))?;
let text = format!("{:width$}", text.value().render(), width = count);
write!(rc.writer(), "{}", text)?;
out.write(&text)?;
Ok(())
}
}
@ -190,15 +188,15 @@ impl HelperDef for RightPadHelper {
pub struct AbbrevHelper;
impl HelperDef for AbbrevHelper {
fn call(&self, h: &Helper, _: &Handlebars, rc: &mut RenderContext) -> Result<(), RenderError> {
fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut Output) -> Result<(), RenderError> {
let count = param_to_number(0, h)? as usize;
let text = h.param(1).ok_or(RenderError::new("Too few arguments"))?.value().render();
write!(rc.writer(), "{}", text.chars().take(count).collect::<String>())?;
out.write(&text.chars().take(count).collect::<String>())?;
Ok(())
}
}
pub fn register_all_color_helpers(handlebars: &mut Handlebars) {
pub fn register_all_color_helpers(handlebars: &mut Registry) {
handlebars.register_helper("black" , Box::new(ColorizeBlackHelper));
handlebars.register_helper("blue" , Box::new(ColorizeBlueHelper));
handlebars.register_helper("cyan" , Box::new(ColorizeCyanHelper));
@ -209,7 +207,7 @@ pub fn register_all_color_helpers(handlebars: &mut Handlebars) {
handlebars.register_helper("yellow" , Box::new(ColorizeYellowHelper));
}
pub fn register_all_format_helpers(handlebars: &mut Handlebars) {
pub fn register_all_format_helpers(handlebars: &mut Registry) {
handlebars.register_helper("underline" , Box::new(UnderlineHelper));
handlebars.register_helper("bold" , Box::new(BoldHelper));
handlebars.register_helper("blink" , Box::new(BlinkHelper));

View file

@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
notify-rust = "3.4.2"
error-chain = "0.11"
error-chain = "0.12"
libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" }

View file

@ -20,7 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
lazy_static = "0.2"
lazy_static = "1"
log = "0.4.0"
chrono = "0.4"
regex = "0.2"

View file

@ -28,7 +28,7 @@ testing = []
[dependencies]
url = "1.5"
boolinator = "2.4.0"
lazy_static = "0.2"
lazy_static = "1"
log = "0.4.0"
regex = "0.2"
tempfile = "2.1"