Skip to content

Upgrade dependencies, including handlebars-rust 4.x.#58

Merged
mkantor merged 2 commits intomasterfrom
upgrade-handlebars
Jun 13, 2021
Merged

Upgrade dependencies, including handlebars-rust 4.x.#58
mkantor merged 2 commits intomasterfrom
upgrade-handlebars

Conversation

@mkantor
Copy link
Owner

@mkantor mkantor commented Jun 13, 2021

ContentLoadingError::IOError { source, name }
}
})?;
.register_template_file(&template_name, content.absolute_path)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid handlebars-rust needing to reopen the file, I could instead read content.file into a String and use register_template_string here. That might be more efficient, but I haven't benchmarked the two approaches against each other (since this only impacts startup time it isn't super important).

I went with the register_template_file approach because it's simpler and because it opens up the option of using dev_mode, which could be useful until #9 is fully addressed.

@mkantor mkantor merged commit 4ca0739 into master Jun 13, 2021
@mkantor mkantor deleted the upgrade-handlebars branch June 13, 2021 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant