From 8505569d3e31ffcbbe0f2b7157ea62b5f29a8785 Mon Sep 17 00:00:00 2001 From: Bazaah Date: Thu, 2 Sep 2021 21:12:53 +0000 Subject: [PATCH] scalar/block: clippy lints --- src/scanner/scalar/block.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scanner/scalar/block.rs b/src/scanner/scalar/block.rs index 19d16cf..f873ce5 100644 --- a/src/scanner/scalar/block.rs +++ b/src/scanner/scalar/block.rs @@ -129,7 +129,7 @@ pub(in crate::scanner) fn scan_block_scalar<'de>( // Loop over scalar line by line until we reach a less // indented line or EOF - while local_stats.column == indent && buffer.len() != 0 + while local_stats.column == indent && (!buffer.is_empty()) { /* * We're at the start of an indented line @@ -298,7 +298,7 @@ fn scan_indent( indent: usize, ) -> Result { - if !(stats.column < indent) + if stats.column >= indent { return Ok(false); }