We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c065170 commit 83a1062Copy full SHA for 83a1062
src/error.rs
@@ -288,7 +288,7 @@ impl From<WalkdirError> for TemplateError {
288
289
fn template_segment(template_str: &str, line: usize, col: usize) -> String {
290
let range = 3;
291
- let line_start = if line >= range { line - range } else { 0 };
+ let line_start = line.saturating_sub(range);
292
let line_end = line + range;
293
294
let mut buf = String::new();
src/macros.rs
@@ -32,7 +32,6 @@
32
/// assert_eq!(&result2, "great!");
33
/// # Ok(()) }
34
/// ```
35
-
36
#[macro_export]
37
macro_rules! handlebars_helper {
38
($struct_name:ident: |$($name:ident: $tpe:tt$(<$($gen:ty),+>)?),*
0 commit comments