Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix character split when strip code#37

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
zbraniecki merged 2 commits intorust-lang:masterfromzzau13:master
Aug 24, 2020
Merged

Fix character split when strip code#37

zbraniecki merged 2 commits intorust-lang:masterfromzzau13:master
Aug 24, 2020

Conversation

@zzau13
Copy link
Contributor

I had made an error to strip code in margin. In cases such as coverage, it could panic.

}else{
false
};
letmut ended =false;
Copy link
Contributor

Choose a reason for hiding this comment

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

can you document this variable? It's a bit unique.

I also feel like there must be a way to make it simpler. Therange.0 is always the result ofacc.0, so basically the firsttake(), and therange.1 should be chainableOption on last element oftake_while so if you put the iterator as a mutable variable, you should be able to doiter.next().or(last).

The refactor is optional, and I'm happy to land this as-is with a comment explaining the variable and its role.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Thisended specifies that it will end in the next character so it will return until the next one to the final condition. In order to measure this last character, when end condition is true, in an efficient way.

I will try to document it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I understand the role, but I had to run an iterator in my head to derive to that conclusion so a doc string would help.

zzau13 reacted with thumbs up emoji
Copy link
Contributor

@zbranieckizbraniecki left a comment

Choose a reason for hiding this comment

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

lgtm! Thank you!

zzau13 reacted with heart emoji
@zbranieckizbraniecki merged commit46c5588 intorust-lang:masterAug 24, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@zbranieckizbranieckizbraniecki approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@zzau13@zbraniecki

[8]ページ先頭

©2009-2025 Movatter.jp