Docstring references parameters tpl_extension and dir_path, while function declaration references dir_path and options.
Looks like #601 introduced the change, but these two doc lines were overlooked.
|
/// Register templates from a directory |
|
/// |
|
/// * `tpl_extension`: the template file extension |
|
/// * `dir_path`: the path of directory |
|
/// |
|
/// Hidden files and tempfile (starts with `#`) will be ignored by default. |
|
/// Set `DirectorySourceOptions` to something other than `DirectorySourceOptions::default()` to adjust this. |
|
/// All registered templates will use their relative path to determine their template name. |
|
/// For example, when `dir_path` is `templates/` and `DirectorySourceOptions.tpl_extension` is `.hbs`, the file |
|
/// `templates/some/path/file.hbs` will be registered as `some/path/file`. |
|
/// |
|
/// This method is not available by default. |
|
/// You will need to enable the `dir_source` feature to use it. |
|
/// |
|
/// When dev_mode is enabled, like with `register_template_file`, templates are reloaded |
|
/// from the file system every time they're visited. |
|
#[cfg(feature = "dir_source")] |
|
#[cfg_attr(docsrs, doc(cfg(feature = "dir_source")))] |
|
pub fn register_templates_directory<P>( |
|
&mut self, |
|
dir_path: P, |
|
options: DirectorySourceOptions, |
|
) -> Result<(), TemplateError> |
Other functions in the file don't seem to have this type of annotation. Should I send a PR just deleting these lines to avoid confusion?
|
/// * `tpl_extension`: the template file extension |
|
/// * `dir_path`: the path of directory |
|
/// |
Docstring references parameters
tpl_extensionanddir_path, while function declaration referencesdir_pathandoptions.Looks like #601 introduced the change, but these two doc lines were overlooked.
handlebars-rust/src/registry.rs
Lines 326 to 348 in 7d666fb
Other functions in the file don't seem to have this type of annotation. Should I send a PR just deleting these lines to avoid confusion?
handlebars-rust/src/registry.rs
Lines 328 to 330 in 7d666fb