From 405a6bfc04e7d22ed895da96e5017184d8da727d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Wed, 6 Apr 2016 10:58:51 +0200 Subject: [PATCH 1/2] Removing match on constant --- ethcore/src/account.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/src/account.rs b/ethcore/src/account.rs index 6901996bc..87f2a05be 100644 --- a/ethcore/src/account.rs +++ b/ethcore/src/account.rs @@ -138,7 +138,7 @@ impl Account { /// get someone who knows to call `note_code`. pub fn code(&self) -> Option<&[u8]> { match self.code_hash { - Some(SHA3_EMPTY) | None if self.code_cache.is_empty() => Some(&self.code_cache), + Some(c) if c == SHA3_EMPTY && self.code_cache.is_empty() => Some(&self.code_cache), Some(_) if !self.code_cache.is_empty() => Some(&self.code_cache), None => Some(&self.code_cache), _ => None, From 0ef6de930fae162bfaf58d0dfbcc5b3fd6005fda Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 8 Apr 2016 17:42:17 -0700 Subject: [PATCH 2/2] Update account.rs --- ethcore/src/account.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/src/account.rs b/ethcore/src/account.rs index 87f2a05be..f2942a7e1 100644 --- a/ethcore/src/account.rs +++ b/ethcore/src/account.rs @@ -138,7 +138,7 @@ impl Account { /// get someone who knows to call `note_code`. pub fn code(&self) -> Option<&[u8]> { match self.code_hash { - Some(c) if c == SHA3_EMPTY && self.code_cache.is_empty() => Some(&self.code_cache), + Some(c) if c == SHA3_EMPTY && self.code_cache.is_empty() => Some(&self.code_cache), Some(_) if !self.code_cache.is_empty() => Some(&self.code_cache), None => Some(&self.code_cache), _ => None,