Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refac: remove string utils #20

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Conversation

saiintbrisson
Copy link

No description provided.

// If the subnet doesn't exist, registration will create it.
Self::add_subnet_from_registration(network.clone(), stake_amount, &key)?;
}
let netuid = if let Some(netuid) = Self::get_netuid_for_name(&network) {
Copy link
Member

@aripiprazole aripiprazole Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.unwrap_or_else?

Copy link
Member

@aripiprazole aripiprazole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The runtime upgrade ran successfully

@@ -182,16 +186,13 @@ impl<T: Config> Pallet<T> {
let mode = proposal.mode.clone();

// check if proposal is valid
if is_vec_str(mode.clone(), "global") {
if mode == GLOBAL_MODE {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it possible to use pattern matching over mode?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, ill refactor it and merge afterwards

@saiintbrisson saiintbrisson force-pushed the refac/remove-string-utils branch from 93a6f78 to 54f318c Compare February 29, 2024 00:06
@saiintbrisson saiintbrisson merged commit 17af07a into main Feb 29, 2024
1 check failed
Supremesource pushed a commit that referenced this pull request Feb 29, 2024
@saiintbrisson saiintbrisson deleted the refac/remove-string-utils branch June 13, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants