From 01f3e7cf59388c65993054303cf2305804e7e633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 22 Feb 2021 11:39:47 +0100 Subject: [PATCH] Fix `clippy::upper-case-acronyms` (#697) * Fix `clippy::upper-case-acronyms` * Fix typo * Add `#[cfg(test)]` to get rid of dead code warning --- crates/lang/codegen/src/generator/dispatch.rs | 4 ++-- crates/storage/src/test_utils.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/lang/codegen/src/generator/dispatch.rs b/crates/lang/codegen/src/generator/dispatch.rs index 674f7591e8..a78fd27613 100644 --- a/crates/lang/codegen/src/generator/dispatch.rs +++ b/crates/lang/codegen/src/generator/dispatch.rs @@ -411,7 +411,7 @@ impl Dispatch<'_> { /// ## Example /// /// Given prefix of `"Message"` and selector with bytes `0xDEADBEEF` we - /// generate the following idenfitier: `__ink_Message_0xDEADBEEF` + /// generate the following identifier: `__ink_Message_0xdeadbeef` /// /// This way it is clear that this is an ink! generated identifier and even /// encodes the unique selector bytes to make the identifier unique. @@ -428,7 +428,7 @@ impl Dispatch<'_> { ir::CallableKind::Constructor => "Constructor", }; quote::format_ident!( - "__ink_{}_0x{:02X}{:02X}{:02X}{:02X}", + "__ink_{}_0x{:02x}{:02x}{:02x}{:02x}", prefix, selector_bytes[0], selector_bytes[1], diff --git a/crates/storage/src/test_utils.rs b/crates/storage/src/test_utils.rs index 31e37ba284..3c2049aca0 100644 --- a/crates/storage/src/test_utils.rs +++ b/crates/storage/src/test_utils.rs @@ -200,6 +200,7 @@ macro_rules! fuzz_storage { } /// Asserts that the storage is empty, without any leftovers. +#[cfg(test)] pub fn assert_storage_clean() { let contract_id = ink_env::test::get_current_contract_account_id::()