about summary refs log tree commit diff
path: root/tvix/eval/src/value/mod.rs
diff options
context:
space:
mode:
authorAaqa Ishtyaq <aaqaishtyaq@gmail.com>2023-02-02T14·34+0530
committertazjin <tazjin@tvl.su>2023-02-13T19·45+0000
commit105069302b57c8fe7cfa99a034f3ad96195a5469 (patch)
tree767684473e4ece1f754abe6a6dccafe013a6075b /tvix/eval/src/value/mod.rs
parentc98c5399b9ce7729a48e5ab5a1e389f31917aeb7 (diff)
chore(tvix/eval): clippy warn is length zero r/5849
This CL address clippy warning about finding the zero
length of something using `is_empty()` instead of `len() == 0`.

Change-Id: I2b36c7c7b65b733609fc0dcd33be06f9d772bc9b
Signed-off-by: Aaqa Ishtyaq <aaqaishtyaq@gmail.com>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8029
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/value/mod.rs')
-rw-r--r--tvix/eval/src/value/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs
index e1afe328dd..8b0b75e866 100644
--- a/tvix/eval/src/value/mod.rs
+++ b/tvix/eval/src/value/mod.rs
@@ -553,7 +553,7 @@ fn total_fmt_float<F: std::fmt::Write>(num: f64, mut f: F) -> std::fmt::Result {
         }
 
         // if we modified the scientific notation, flip the reference
-        if new_s.len() != 0 {
+        if !new_s.is_empty() {
             s = &mut new_s
         }
     }