[PATCH 04 of 11] rust-dirstate: remove repetition in array literal

Yuya Nishihara yuya at tcha.org
Sat Aug 17 08:12:05 EDT 2019


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1566015964 -32400
#      Sat Aug 17 13:26:04 2019 +0900
# Node ID af8265f67d45cfff198c26e639b57e98c0c56287
# Parent  8f7737800ff279e6886250b8e2a21e67d7492937
rust-dirstate: remove repetition in array literal

diff --git a/rust/hg-core/src/dirstate/dirstate_map.rs b/rust/hg-core/src/dirstate/dirstate_map.rs
--- a/rust/hg-core/src/dirstate/dirstate_map.rs
+++ b/rust/hg-core/src/dirstate/dirstate_map.rs
@@ -20,10 +20,7 @@ use std::time::Duration;
 
 pub type FileFoldMap = HashMap<Vec<u8>, Vec<u8>>;
 
-const NULL_REVISION: [u8; 20] = [
-    b'\0', b'\0', b'\0', b'\0', b'\0', b'\0', b'\0', b'\0', b'\0', b'\0',
-    b'\0', b'\0', b'\0', b'\0', b'\0', b'\0', b'\0', b'\0', b'\0', b'\0',
-];
+const NULL_REVISION: [u8; 20] = [0; 20];
 const MTIME_UNSET: i32 = -1;
 const SIZE_DIRTY: i32 = -2;
 


More information about the Mercurial-devel mailing list