diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-05-31 18:15:30 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-05-31 18:15:40 +0200 |
commit | 6bc08b60e6e3a99cc9a263713db33061d63dc964 (patch) | |
tree | e3b7d58387d6104fc567defcf84878517defaf1b | |
parent | be50f5ad51d05dd3d24ecfd6343055737a2757f0 (diff) | |
parent | 1f86bcd12178fd45772b565213e3f874f62494be (diff) |
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
34 files changed, 80 insertions, 85 deletions
diff --git a/bin/core/imag-view/Cargo.toml b/bin/core/imag-view/Cargo.toml index 8eb92907..7015d5f5 100644 --- a/bin/core/imag-view/Cargo.toml +++ b/bin/core/imag-view/Cargo.toml @@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" } log = "0.4.6" toml = "0.5.1" toml-query = "0.10" -handlebars = "2" +handlebars = "3" tempfile = "3.0.9" anyhow = "1" resiter = "0.4.0" diff --git a/bin/domain/imag-bookmark/Cargo.toml b/bin/domain/imag-bookmark/Cargo.toml index f062b16f..565b6a3e 100644 --- a/bin/domain/imag-bookmark/Cargo.toml +++ b/bin/domain/imag-bookmark/Cargo.toml @@ -26,7 +26,7 @@ toml-query = "0.10" anyhow = "1" resiter = "0.4.0" url = "2" -handlebars = "2" +handlebars = "3" rayon = "1" libimagrt = { version = "0.10.0", path = "../../../lib/core/libimagrt" } @@ -43,7 +43,7 @@ default-features = false features = ["color", "suggestions", "wrap_help"] [dependencies.uuid] -version = "0.7" +version = "0.8" default-features = false features = ["serde", "v4"] diff --git a/bin/domain/imag-calendar/Cargo.toml b/bin/domain/imag-calendar/Cargo.toml index 12146bea..12a5359d 100644 --- a/bin/domain/imag-calendar/Cargo.toml +++ b/bin/domain/imag-calendar/Cargo.toml @@ -26,7 +26,7 @@ anyhow = "1" failure = "0.1" walkdir = "2.2.8" vobject = "0.7" -handlebars = "2" +handlebars = "3" chrono = "0.4" kairos = "0.3" resiter = "0.4.0" diff --git a/bin/domain/imag-calendar/src/util.rs b/bin/domain/imag-calendar/src/util.rs index 1467d310..636e3ec3 100644 --- a/bin/domain/imag-calendar/src/util.rs +++ b/bin/domain/imag-calendar/src/util.rs @@ -71,8 +71,8 @@ impl<'a> ParsedEventFLE<'a> { } } -pub fn get_event_print_format(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) - -> Result<Handlebars> +pub fn get_event_print_format<'rc>(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) + -> Result<Handlebars<'rc>> { scmd.value_of("format") .map(String::from) diff --git a/bin/domain/imag-contact/Cargo.toml b/bin/domain/imag-contact/Cargo.toml index 12f6392e..9427c42e 100644 --- a/bin/domain/imag-contact/Cargo.toml +++ b/bin/domain/imag-contact/Cargo.toml @@ -23,9 +23,9 @@ maintenance = { status = "actively-developed" } log = "0.4.6" toml = "0.5.1" vobject = "0.7.0" -handlebars = "2" +handlebars = "3" walkdir = "2.2.8" -uuid = { version = "0.7.4", features = ["v4"] } +uuid = { version = "0.8", features = ["v4"] } serde_json = "1.0.39" anyhow = "1" resiter = "0.4" diff --git a/bin/domain/imag-contact/src/lib.rs b/bin/domain/imag-contact/src/lib.rs index 13f17e0f..f7a4af90 100644 --- a/bin/domain/imag-contact/src/lib.rs +++ b/bin/domain/imag-contact/src/lib.rs @@ -380,7 +380,7 @@ fn find(rt: &Runtime) -> Result<()> { } } -fn get_contact_print_format(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars> { +fn get_contact_print_format<'rc>(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars<'rc>> { let fmt = match scmd.value_of("format").map(String::from) { Some(s) => Ok(s), None => rt.config() diff --git a/bin/domain/imag-diary/Cargo.toml b/bin/domain/imag-diary/Cargo.toml index 1fbf2ff3..ed0d4c49 100644 --- a/bin/domain/imag-diary/Cargo.toml +++ b/bin/domain/imag-diary/Cargo.toml @@ -24,7 +24,7 @@ chrono = "0.4.7" log = "0.4.6" toml = "0.5.1" toml-query = "0.10" -itertools = "0.8.0" +itertools = "0.9.0" anyhow = "1" resiter = "0.4.0" option-inspect = "0.1.0" diff --git a/bin/domain/imag-log/Cargo.toml b/bin/domain/imag-log/Cargo.toml index b0f974fe..ca456003 100644 --- a/bin/domain/imag-log/Cargo.toml +++ b/bin/domain/imag-log/Cargo.toml @@ -24,7 +24,7 @@ log = "0.4.6" toml = "0.5.1" toml-query = "0.10" is-match = "0.1.0" -itertools = "0.8.0" +itertools = "0.9.0" anyhow = "1" textwrap = "0.11.0" resiter = "0.4.0" diff --git a/bin/domain/imag-mail/Cargo.toml b/bin/domain/imag-mail/Cargo.toml index a1c0dcab..32cae649 100644 --- a/bin/domain/imag-mail/Cargo.toml +++ b/bin/domain/imag-mail/Cargo.toml @@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" } log = "0.4.6" anyhow = "1" resiter = "0.4" -handlebars = "2" +handlebars = "3" walkdir = "2" rayon = "1" diff --git a/bin/domain/imag-mail/src/util.rs b/bin/domain/imag-mail/src/util.rs index bdd27ba2..151c82fb 100644 --- a/bin/domain/imag-mail/src/util.rs +++ b/bin/domain/imag-mail/src/util.rs @@ -32,7 +32,7 @@ use libimagrt::runtime::Runtime; use libimagstore::store::FileLockEntry; use libimagentryref::reference::Config as RefConfig; -pub fn get_mail_print_format(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars> { +pub fn get_mail_print_format<'rc>(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars<'rc>> { let fmt = match scmd.value_of("format").map(String::from) { Some(s) => Ok(s), None => { diff --git a/bin/domain/imag-notes/Cargo.toml b/bin/domain/imag-notes/Cargo.toml index 574a8cb0..72b6712c 100644 --- a/bin/domain/imag-notes/Cargo.toml +++ b/bin/domain/imag-notes/Cargo.toml @@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" } [dependencies] log = "0.4.6" -itertools = "0.8.0" +itertools = "0.9.0" anyhow = "1" resiter = "0.4.0" diff --git a/bin/domain/imag-timetrack/Cargo.toml b/bin/domain/imag-timetrack/Cargo.toml index e519aba7..e0ddd896 100644 --- a/bin/domain/imag-timetrack/Cargo.toml +++ b/bin/domain/imag-timetrack/Cargo.toml @@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" } log = "0.4.6" chrono = "0.4.7" filters = "0.3.0" -itertools = "0.8.0" +itertools = "0.9.0" prettytable-rs = "0.8.0" kairos = "0.3.0" anyhow = "1" diff --git a/bin/domain/imag-todo/Cargo.toml b/bin/domain/imag-todo/Cargo.toml index d837b70a..55a62422 100644 --- a/bin/domain/imag-todo/Cargo.toml +++ b/bin/domain/imag-todo/Cargo.toml @@ -29,7 +29,7 @@ chrono = "0.4" filters = "0.3" kairos = "0.3" resiter = "0.4.0" -handlebars = "2" +handlebars = "3" prettytable-rs = "0.8.0" libimagrt = { version = "0.10.0", path = "../../../lib/core/libimagrt" } @@ -47,11 +47,11 @@ default-features = false features = ["color", "suggestions", "wrap_help"] [dependencies.task-hookrs] -version = "0.7.0" +git = "https://github.com/matthiasbeyer/task-hookrs" optional = true [dependencies.uuid] -version = "0.7.4" +version = "0.8" features = ["v4"] optional = true diff --git a/bin/domain/imag-todo/src/util.rs b/bin/domain/imag-todo/src/util.rs index 9fce60e6..a22a3ae2 100644 --- a/bin/domain/imag-todo/src/util.rs +++ b/bin/domain/imag-todo/src/util.rs @@ -38,7 +38,7 @@ pub fn get_dt_str(d: Result<Option<NaiveDateTime>>, s: &str) -> Result<String> { .unwrap_or_else(|| s.to_string())) } -pub fn get_todo_print_format(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars> { +pub fn get_todo_print_format<'rc>(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars<'rc>> { let fmt = match scmd.value_of("format").map(String::from) { Some(s) => Ok(s), None => { diff --git a/lib/core/libimagrt/Cargo.toml b/lib/core/libimagrt/Cargo.toml index 34a9d964..c8daf777 100644 --- a/lib/core/libimagrt/Cargo.toml +++ b/lib/core/libimagrt/Cargo.toml @@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" } env_logger = "0.7" toml = "0.5.1" xdg-basedir = "1.0.0" -itertools = "0.8.0" +itertools = "0.9.0" ansi_term = "0.12" atty = "0.2.11" anyhow = "1" @@ -48,7 +48,7 @@ default-features = false features = ["std", "serde"] [dependencies.handlebars] -version = "2" +version = "3" default-features = false features = ["no_logging"] diff --git a/lib/core/libimagrt/src/logger.rs b/lib/core/libimagrt/src/logger.rs index 329f9f09..94d72a16 100644 --- a/lib/core/libimagrt/src/logger.rs +++ b/lib/core/libimagrt/src/logger.rs @@ -48,19 +48,19 @@ impl Default for LogDestination { /// Logger implementation for `log` crate. #[derive(Debug)] -pub struct ImagLogger { +pub struct ImagLogger<'rc> { global_loglevel : Level, #[allow(unused)] global_destinations : Vec<LogDestination>, - handlebars: Handlebars, + handlebars: Handlebars<'rc>, } -impl ImagLogger { +impl<'rc> ImagLogger<'rc> { /// Create a new ImagLogger object with a certain level - pub fn new(matches: &ArgMatches, config: Option<&Value>) -> Result<ImagLogger> { + pub fn new(matches: &ArgMatches, config: Option<&Value>) -> Result<ImagLogger<'rc>> { let mut handlebars = Handlebars::new(); handlebars.register_escape_fn(::handlebars::no_escape); @@ -90,7 +90,7 @@ impl ImagLogger { } -impl Log for ImagLogger { +impl<'rc> Log for ImagLogger<'rc> { fn enabled(&self, metadata: &Metadata) -> bool { metadata.level() <= self.global_loglevel diff --git a/lib/core/libimagstore/Cargo.toml b/lib/core/libimagstore/Cargo.toml index 5d5c56f0..f5df8e37 100644 --- a/lib/core/libimagstore/Cargo.toml +++ b/lib/core/libimagstore/Cargo.toml @@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" } glob = "0.3.0" log = "0.4.6" regex = "1.1.7" -semver = "0.9.0" +semver = "0.10.0" toml = "0.5.1" walkdir = "2.2.8" is-match = "0.1.0" diff --git a/lib/domain/libimagbookmark/Cargo.toml b/lib/domain/libimagbookmark/Cargo.toml index 06aeb943..f1c428c7 100644 --- a/lib/domain/libimagbookmark/Cargo.toml +++ b/lib/domain/libimagbookmark/Cargo.toml @@ -31,7 +31,7 @@ libimagentryurl = { version = "0.10.0", path = "../../../lib/entry/libimagentry libimagentryutil = { version = "0.10.0", path = "../../../lib/entry/libimagentryutil" } [dependencies.uuid] -version = "0.7" +version = "0.8" default-features = false features = ["serde", "v4"] diff --git a/lib/domain/libimagcontact/Cargo.toml b/lib/domain/libimagcontact/Cargo.toml index 5ae439b7..4ef44598 100644 --- a/lib/domain/libimagcontact/Cargo.toml +++ b/lib/domain/libimagcontact/Cargo.toml @@ -26,7 +26,7 @@ log = "0.4.6" toml = "0.5.1" toml-query = "0.10" vobject = "0.7.0" -uuid = "0.7.4" +uuid = "0.8" serde = "1.0.94" serde_derive = "1.0.94" diff --git a/lib/domain/libimagdiary/Cargo.toml b/lib/domain/libimagdiary/Cargo.toml index 49533626..872f9d20 100644 --- a/lib/domain/libimagdiary/Cargo.toml +++ b/lib/domain/libimagdiary/Cargo.toml @@ -24,7 +24,7 @@ chrono = "0.4.7" log = "0.4.6" toml = "0.5.1" toml-query = "0.10" -itertools = "0.8.0" +itertools = "0.9.0" anyhow = "1" filters = "0.3.0" diff --git a/lib/domain/libimagtodo/Cargo.toml b/lib/domain/libimagtodo/Cargo.toml index 77389b51..64312c34 100644 --- a/lib/domain/libimagtodo/Cargo.toml +++ b/lib/domain/libimagtodo/Cargo.toml @@ -44,7 +44,7 @@ default-features = false features = ["serde"] [dependencies.uuid] -version = "0.7" +version = "0.8" default-features = false features = ["serde", "v4"] diff --git a/lib/entry/libimagentryannotation/Cargo.toml b/lib/entry/libimagentryannotation/Cargo.toml index d618115e..1f26fdec 100644 --- a/lib/entry/libimagentryannotation/Cargo.toml +++ b/lib/entry/libimagentryannotation/Cargo.toml @@ -25,7 +25,7 @@ toml = "0.5.1" toml-query = "0.10" anyhow = "1" -uuid = { version = "0.7.4", features = ["v4"] } +uuid = { version = "0.8", features = ["v4"] } log = "0.4.6" diff --git a/lib/entry/libimagentryfilter/Cargo.toml b/lib/entry/libimagentryfilter/Cargo.toml index bf15d9d9..b954d954 100644 --- a/lib/entry/libimagentryfilter/Cargo.toml +++ b/lib/entry/libimagentryfilter/Cargo.toml @@ -21,10 +21,10 @@ maintenance = { status = "actively-developed" } [dependencies] filters = "0.3.0" -itertools = "0.8.0" +itertools = "0.9.0" log = "0.4.6" regex = "1.1.7" -semver = "0.9.0" +semver = "0.10.0" toml = "0.5.1" toml-query = "0.10" anyhow = "1" diff --git a/lib/entry/libimagentrylink/Cargo.toml b/lib/entry/libimagentrylink/Cargo.toml index 09ed3ded..3c6bbc5b 100644 --- a/lib/entry/libimagentrylink/Cargo.toml +++ b/lib/entry/libimagentrylink/Cargo.toml @@ -20,7 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" } maintenance = { status = "actively-developed" } [dependencies] -itertools = "0.8.0" +itertools = "0.9.0" log = "0.4.6" toml = "0.5.1" url = "2" diff --git a/lib/entry/libimagentryref/Cargo.toml b/lib/entry/libimagentryref/Cargo.toml index 6b665121..769a31bc 100644 --- a/lib/entry/libimagentryref/Cargo.toml +++ b/lib/entry/libimagentryref/Cargo.toml @@ -20,7 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" } maintenance = { status = "actively-developed" } [dependencies] -itertools = "0.8.0" +itertools = "0.9.0" log = "0.4.6" anyhow = "1" sha-1 = "0.8.1" diff --git a/lib/entry/libimagentrytag/Cargo.toml b/lib/entry/libimagentrytag/Cargo.toml index 1b17757b..218ef914 100644 --- a/lib/entry/libimagentrytag/Cargo.toml +++ b/lib/entry/libimagentrytag/Cargo.toml @@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" } log = "0.4.6" regex = "1.1.7" toml = "0.5.1" -itertools = "0.8.0" +itertools = "0.9.0" filters = "0.3.0" anyhow = "1" serde = "1.0.94" diff --git a/lib/entry/libimagentryurl/Cargo.toml b/lib/entry/libimagentryurl/Cargo.toml index 26a896a2..272f06d3 100644 --- a/lib/entry/libimagentryurl/Cargo.toml +++ b/lib/entry/libimagentryurl/Cargo.toml @@ -20,7 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" } maintenance = { status = "actively-developed" } [dependencies] -itertools = "0.8.0" +itertools = "0.9.0" log = "0.4.6" toml = "0.5.1" url = "2" diff --git a/lib/entry/libimagentryview/Cargo.toml b/lib/entry/libimagentryview/Cargo.toml index 4e0a1f78..bd5044ce 100644 --- a/lib/entry/libimagentryview/Cargo.toml +++ b/lib/entry/libimagentryview/Cargo.toml @@ -30,7 +30,7 @@ libimagstore = { version = "0.10.0", path = "../../../lib/core/libimagstore" libimagerror = { version = "0.10.0", path = "../../../lib/core/libimagerror" } libimagentryedit = { version = "0.10.0", path = "../../../lib/entry/libimagentryedit" } -mdcat = { version = "0.15.0", optional = true } +mdcat = { version = "0.17.0", optional = true } [dependencies.pulldown-cmark] version = "^0.7" @@ -39,7 +39,7 @@ default-features = false features = [] [dependencies.syntect] -version = "3" +version = "4" optional = true default-features = false features = ["parsing", "assets", "dump-load"] diff --git a/lib/entry/libimagentryview/src/builtin/md.rs b/lib/entry/libimagentryview/src/builtin/md.rs index b4bd13c6..771be295 100644 --- a/lib/entry/libimagentryview/src/builtin/md.rs +++ b/lib/entry/libimagentryview/src/builtin/md.rs @@ -30,22 +30,11 @@ use anyhow::format_err; use crate::viewer::Viewer; -pub struct MarkdownViewer<'a> { - rt: &'a Runtime<'a>, - resource_access: ResourceAccess, - termsize: TerminalSize, -} +pub struct MarkdownViewer<'a>(&'a Runtime<'a>); impl<'a> MarkdownViewer<'a> { pub fn new(rt: &'a Runtime) -> Self { - MarkdownViewer { - rt, - resource_access: ResourceAccess::LocalOnly, - termsize: TerminalSize::detect().unwrap_or(TerminalSize { - width: 80, - height: 20, - }), - } + MarkdownViewer(rt) } } @@ -53,18 +42,22 @@ impl<'a> Viewer for MarkdownViewer<'a> { fn view_entry<W>(&self, e: &Entry, sink: &mut W) -> Result<()> where W: Write { - let parser = Parser::new(e.get_content()); - let base_dir = self.rt.rtp(); - let syntax_set = SyntaxSet::load_defaults_newlines(); - let capa = TerminalCapabilities::ansi(); + let parser = Parser::new(e.get_content()); + let base_dir = self.0.rtp(); + let settings = mdcat::Settings { + terminal_capabilities: TerminalCapabilities::ansi(), + syntax_set: SyntaxSet::load_defaults_newlines(), + resource_access: ResourceAccess::LocalOnly, + terminal_size: TerminalSize::detect().unwrap_or(TerminalSize { + width: 80, + height: 20, + }), + }; - ::mdcat::push_tty(sink, - &capa, - self.termsize, - parser, + ::mdcat::push_tty(&settings, + sink, base_dir, - self.resource_access, - syntax_set) + parser) .map_err(|_| format_err!("Failed while formatting markdown")) } } diff --git a/lib/etc/libimaginteraction/Cargo.toml b/lib/etc/libimaginteraction/Cargo.toml index 5309697e..d08ea647 100644 --- a/lib/etc/libimaginteraction/Cargo.toml +++ b/lib/etc/libimaginteraction/Cargo.toml @@ -26,7 +26,7 @@ lazy_static = "1.3.0" log = "0.4.6" regex = "1.1.7" toml = "0.5.1" -handlebars = "2" +handlebars = "3" serde_json = "1.0.39" serde_derive = "1" serde = "1" diff --git a/lib/etc/libimaginteraction/src/format.rs b/lib/etc/libimaginteraction/src/format.rs index 6515df2d..9583237f 100644 --- a/lib/etc/libimaginteraction/src/format.rs +++ b/lib/etc/libimaginteraction/src/format.rs @@ -66,7 +66,7 @@ impl From<String> for HandlebarsData { pub struct ColorizeBlackHelper; impl HelperDef for ColorizeBlackHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { colorize(Colour::Black, h, out) } } @@ -75,7 +75,7 @@ impl HelperDef for ColorizeBlackHelper { pub struct ColorizeBlueHelper; impl HelperDef for ColorizeBlueHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { colorize(Colour::Blue, h, out) } } @@ -84,7 +84,7 @@ impl HelperDef for ColorizeBlueHelper { pub struct ColorizeCyanHelper; impl HelperDef for ColorizeCyanHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { colorize(Colour::Cyan, h, out) } } @@ -93,7 +93,7 @@ impl HelperDef for ColorizeCyanHelper { pub struct ColorizeGreenHelper; impl HelperDef for ColorizeGreenHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { colorize(Colour::Green, h, out) } } @@ -102,7 +102,7 @@ impl HelperDef for ColorizeGreenHelper { pub struct ColorizePurpleHelper; impl HelperDef for ColorizePurpleHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { colorize(Colour::Purple, h, out) } } @@ -111,7 +111,7 @@ impl HelperDef for ColorizePurpleHelper { pub struct ColorizeRedHelper; impl HelperDef for ColorizeRedHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { colorize(Colour::Red, h, out) } } @@ -120,7 +120,7 @@ impl HelperDef for ColorizeRedHelper { pub struct ColorizeWhiteHelper; impl HelperDef for ColorizeWhiteHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { colorize(Colour::White, h, out) } } @@ -129,7 +129,7 @@ impl HelperDef for ColorizeWhiteHelper { pub struct ColorizeYellowHelper; impl HelperDef for ColorizeYellowHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { colorize(Colour::Yellow, h, out) } } @@ -146,7 +146,7 @@ fn colorize(color: Colour, h: &Helper, output: &mut dyn Output) -> Result<(), Re pub struct UnderlineHelper; impl HelperDef for UnderlineHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { let p = h.param(0).ok_or_else(|| RenderError::new("Too few arguments"))?; let s = Style::new().underline(); out.write(&format!("{}", s.paint(p.value().render())))?; @@ -158,7 +158,7 @@ impl HelperDef for UnderlineHelper { pub struct BoldHelper; impl HelperDef for BoldHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { let p = h.param(0).ok_or_else(|| RenderError::new("Too few arguments"))?; let s = Style::new().bold(); out.write(&format!("{}", s.paint(p.value().render())))?; @@ -170,7 +170,7 @@ impl HelperDef for BoldHelper { pub struct BlinkHelper; impl HelperDef for BlinkHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> { + fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> { let p = h.param(0).ok_or_else(|| RenderError::new("Too few arguments"))?; let s = Style::new().blink(); out.write(&format!("{}", s.paint(p.value().render())))?; @@ -182,7 +182,7 @@ impl HelperDef for BlinkHelper { pub struct StrikethroughHelper; impl HelperDef for StrikethroughHelper { - fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<' |