From 1d97b4230fdc74039bddc8b8b4e159c6ebc1dfbd Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 16 Oct 2023 11:41:38 +0100 Subject: refactor(tvix/castore): clippy Change-Id: I8a792d6b238190a78390c5d8f638669a2681f70f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9746 Tested-by: BuildkiteCI Autosubmit: flokli Reviewed-by: raitobezarius --- tvix/castore/src/proto/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/castore/src') diff --git a/tvix/castore/src/proto/mod.rs b/tvix/castore/src/proto/mod.rs index 0e7a363149b2..cd7ea66b8ccd 100644 --- a/tvix/castore/src/proto/mod.rs +++ b/tvix/castore/src/proto/mod.rs @@ -133,7 +133,7 @@ impl node::Node { } // ensure the symlink target is not empty and doesn't contain null bytes. node::Node::Symlink(symlink_node) => { - if symlink_node.target.len() == 0 || symlink_node.target.contains(&b'\0') { + if symlink_node.target.is_empty() || symlink_node.target.contains(&b'\0') { Err(ValidateNodeError::InvalidSymlinkTarget( symlink_node.target.to_vec(), ))?; -- cgit 1.4.1