From d1920525192c8e6011073ca2ab0e37ac974b6edf Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 4 Nov 2022 11:45:57 +1100 Subject: [PATCH] Remove unnecessary dereference Clippy emits: warning: deref which would be done by auto-deref As suggested, remove the unnecessary deref (`*`). --- bitcoin/src/blockdata/script.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/src/blockdata/script.rs b/bitcoin/src/blockdata/script.rs index 7628da14..8cb8c76f 100644 --- a/bitcoin/src/blockdata/script.rs +++ b/bitcoin/src/blockdata/script.rs @@ -443,7 +443,7 @@ impl Script { pub fn is_empty(&self) -> bool { self.0.is_empty() } /// Returns the script data as a byte slice. - pub fn as_bytes(&self) -> &[u8] { &*self.0 } + pub fn as_bytes(&self) -> &[u8] { &self.0 } /// Returns a copy of the script data. pub fn to_bytes(&self) -> Vec { self.0.clone().into_vec() }