Skip to content

Commit 83a1062

Browse files
committed
fix: lint warnings
1 parent c065170 commit 83a1062

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ impl From<WalkdirError> for TemplateError {
288288

289289
fn template_segment(template_str: &str, line: usize, col: usize) -> String {
290290
let range = 3;
291-
let line_start = if line >= range { line - range } else { 0 };
291+
let line_start = line.saturating_sub(range);
292292
let line_end = line + range;
293293

294294
let mut buf = String::new();

src/macros.rs

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
/// assert_eq!(&result2, "great!");
3333
/// # Ok(()) }
3434
/// ```
35-
3635
#[macro_export]
3736
macro_rules! handlebars_helper {
3837
($struct_name:ident: |$($name:ident: $tpe:tt$(<$($gen:ty),+>)?),*

0 commit comments

Comments
 (0)