From ec5d535ffc415539333d3fdfefdee3ae42b6bb3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Fri, 15 Oct 2021 02:46:28 +0200 Subject: [PATCH] access list: improve naming --- aquatic_common/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aquatic_common/src/lib.rs b/aquatic_common/src/lib.rs index eeca362..8d34357 100644 --- a/aquatic_common/src/lib.rs +++ b/aquatic_common/src/lib.rs @@ -35,7 +35,7 @@ impl Default for AccessListConfig { pub struct AccessList(HashSet<[u8; 20]>); impl AccessList { - fn parse_line_to_info_hash(line: String) -> anyhow::Result<[u8; 20]> { + fn parse_info_hash(line: String) -> anyhow::Result<[u8; 20]> { if line.len() != 20 { return Err(anyhow::anyhow!("Info hash is not 20 bytes long: {}", line)); } @@ -63,7 +63,7 @@ impl AccessList { let mut new_list = HashSet::new(); for line in reader.lines() { - new_list.insert(Self::parse_line_to_info_hash(line?)?); + new_list.insert(Self::parse_info_hash(line?)?); } self.0 = new_list;