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

[refactor] Validate item names/ids without allocating Vec #3003

Closed
wants to merge 4 commits into from
Closed

[refactor] Validate item names/ids without allocating Vec #3003

wants to merge 4 commits into from

Conversation

fofyou
Copy link

@fofyou fofyou commented Dec 9, 2022

Signed-off-by: Wenfeng Sui suiwenfeng@qq.com

Description of the Change

Issue

Benefits

Possible Drawbacks

Usage Examples or Tests [optional]

Alternate Designs [optional]

Signed-off-by: Wenfeng Sui <suiwenfeng@qq.com>
@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Dec 9, 2022
config/src/client.rs Outdated Show resolved Hide resolved
Signed-off-by: Wenfeng Sui suiwenfeng@qq.com
Copy link
Contributor

@Erigara Erigara left a comment

Choose a reason for hiding this comment

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

Good job!
Here few minor things you should do:

  1. We use standardize format for commit names, so you commit message should look like: [refactor] #2675: Validate item names/ids without allocating Vec.
  2. Also we use rustfmt in our workflow , you can run it by following command: cargo +nightly fmt --all

data_model/tests/data_model.rs Outdated Show resolved Hide resolved
assert!(account_empty.is_err());

let account_invalid: Result<AccountId, _> = "testhello".parse();
assert!(account_invalid.is_err());
Copy link
Contributor

Choose a reason for hiding this comment

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

Wight be redundant but we can also test for string "@".

Copy link
Author

Choose a reason for hiding this comment

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

i reopened a pr for some reason, you have to check this at #3004 now.

@codecov
Copy link

codecov bot commented Dec 9, 2022

Codecov Report

Merging #3003 (d5f4996) into iroha2-dev (a16d9c3) will decrease coverage by 5.13%.
The diff coverage is 70.29%.

❗ Current head d5f4996 differs from pull request most recent head fcc4498. Consider uploading reports for the commit fcc4498 to get more accurate results

@@              Coverage Diff               @@
##           iroha2-dev    #3003      +/-   ##
==============================================
- Coverage       67.61%   62.47%   -5.14%     
==============================================
  Files             140      169      +29     
  Lines           26173    30948    +4775     
==============================================
+ Hits            17696    19334    +1638     
- Misses           8477    11614    +3137     
Impacted Files Coverage Δ
actor/src/actor_id.rs 90.00% <ø> (ø)
actor/src/deadlock.rs 85.93% <ø> (-14.07%) ⬇️
cli/derive/src/lib.rs 92.30% <ø> (+17.58%) ⬆️
cli/src/event.rs 0.00% <0.00%> (-41.87%) ⬇️
cli/src/main.rs 1.09% <0.00%> (-0.26%) ⬇️
cli/src/stream.rs 0.00% <ø> (-81.40%) ⬇️
client/src/http.rs 51.16% <0.00%> (+3.33%) ⬆️
client/src/http_default.rs 40.17% <0.00%> (-20.01%) ⬇️
client_cli/src/main.rs 0.25% <0.00%> (-0.01%) ⬇️
config/base/src/runtime_upgrades.rs 49.42% <0.00%> (ø)
... and 225 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Erigara and others added 2 commits December 9, 2022 16:21
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Wenfeng Sui suiwenfeng@qq.com
@fofyou fofyou closed this by deleting the head repository Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants