Skip to content

Commit

Permalink
chore: fix warnings on trait object without dyn keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
Geobert Quach committed Aug 22, 2019
1 parent 3403461 commit a5791f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cobalt_model/files.rs
Expand Up @@ -84,7 +84,7 @@ impl FilesBuilder {
}

pub struct FilesIterator<'a> {
inner: Box<Iterator<Item = path::PathBuf> + 'a>,
inner: Box<dyn Iterator<Item = path::PathBuf> + 'a>,
}

impl<'a> FilesIterator<'a> {
Expand Down
2 changes: 1 addition & 1 deletion src/cobalt_model/template.rs
Expand Up @@ -46,7 +46,7 @@ impl LiquidBuilder {
Ok(Liquid { parser })
}

fn highlight(theme: String) -> Result<Box<liquid::compiler::ParseBlock>> {
fn highlight(theme: String) -> Result<Box<dyn liquid::compiler::ParseBlock>> {
let result: Result<()> = match syntax_highlight::has_syntax_theme(&theme) {
Ok(true) => Ok(()),
Ok(false) => Err(failure::format_err!(
Expand Down
4 changes: 2 additions & 2 deletions src/syntax_highlight/syntect.rs
Expand Up @@ -70,7 +70,7 @@ struct CodeBlock {
}

impl Renderable for CodeBlock {
fn render_to(&self, writer: &mut Write, _context: &mut Context) -> Result<(), liquid::Error> {
fn render_to(&self, writer: &mut dyn Write, _context: &mut Context) -> Result<(), liquid::Error> {
let syntax = match self.lang {
Some(ref lang) => SETUP.syntax_set.find_syntax_by_token(lang),
_ => None,
Expand Down Expand Up @@ -106,7 +106,7 @@ impl liquid::compiler::ParseBlock for CodeBlockParser {
mut arguments: TagTokenIter,
mut tokens: TagBlock,
_options: &Language,
) -> Result<Box<Renderable>, liquid::Error> {
) -> Result<Box<dyn Renderable>, liquid::Error> {
let lang = arguments
.expect_next("Identifier or literal expected.")
.ok()
Expand Down

0 comments on commit a5791f9

Please sign in to comment.