Skip to content

Commit 6359c85

Browse files
committed
better if statement
1 parent 65f4580 commit 6359c85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

primitives/src/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ where
3838

3939
fn validate_channel_id(s: &str) -> Result<&str, FromHexError> {
4040
match (s.get(0..2), s.get(2..)) {
41-
(Some(prefix), Some(hex)) => if s.len() != 66 || prefix != "0x" {
41+
(Some(prefix), Some(hex)) => if hex.len() != 64 || prefix != "0x" {
4242
Err(FromHexError::InvalidStringLength)
4343
} else {
4444
Ok(hex)

0 commit comments

Comments
 (0)