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

login
register
mail settings
Submitter Yuya Nishihara
Date Aug. 17, 2019, 12:12 p.m.
Message ID <af8265f67d45cfff198c.1566043925@mimosa>
Download mbox | patch
Permalink /patch/41326/
State Accepted
Headers show

Comments

Yuya Nishihara - Aug. 17, 2019, 12:12 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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

Patch

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;