Skip to content

Commit 83dcf11

Browse files
feat(packages): cleanup commented code and comments (#448)
* feat(packages): cleanup * Update packages/iota-names/sources/deny_list.move Co-authored-by: Thibault Martinez <thibault@iota.org> * Apply suggestion from @Thoralf-M --------- Co-authored-by: Thibault Martinez <thibault@iota.org>
1 parent 783353d commit 83dcf11

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

packages/iota-names/sources/deny_list.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::string::String;
1212
#[error]
1313
const ENoLabelsInList: vector<u8> = b"No labels in the passed list.";
1414

15-
/// A wrapper that holds the reserved and blocked labels.
15+
/// A type that holds the reserved and blocked labels. Attached to the `IotaNames` object as dynamic field.
1616
public struct DenyList has store {
1717
// The list of reserved labels.
1818
reserved: Table<String, bool>,

packages/iota-names/sources/name.move

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ fun is_valid_label(label: &String): bool {
155155
while (index < len) {
156156
let character = label_bytes[index];
157157
let is_valid_character =
158-
(0x61 <= character && character <= 0x7A) // a-z
159-
|| (0x30 <= character && character <= 0x39) // 0-9
158+
(0x61 <= character && character <= 0x7A) // a-z
159+
|| (0x30 <= character && character <= 0x39) // 0-9
160160
|| (character == 0x2D && index != 0 && index != len - 1); // '-' not at beginning or end
161161

162162
if (!is_valid_character) {

packages/iota-names/sources/name_registration.move

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ use iota_names::constants;
1919
use iota_names::name::Name;
2020
use std::string::String;
2121

22-
/* friend iota_names::registry; */
23-
2422
/// The main access point for the user.
2523
public struct NameRegistration has key, store {
2624
id: UID,

packages/iota-names/sources/subname_registration.move

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ module iota_names::subname_registration;
1313
use iota::clock::Clock;
1414
use iota_names::name_registration::NameRegistration;
1515

16-
/* friend iota_names::registry; */
17-
/* #[test_only] */
18-
/* friend iota_names::subname_tests; */
19-
2016
/// === Error codes ===
2117
#[error]
2218
const ENftExpired: vector<u8> = b"NFT is expired.";

0 commit comments

Comments
 (0)