Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thiagodejesus
Copy link
Contributor

Hi, I added methods to allow the grid to be expanded by x rows or x cols without the need do a lot of push_rows or push_cols. I don't know if it is a problem, but as I needed to initialize some data to those new rows or cols, i implemented this only for type T that haves the trait Default.

I believe that the benefits of this methods are to make it easier to someone using the lib to expand the grid and also to allow the grid to be expanded with less reallocations of it internal data Vec.

This is my very first contribution to an open source project so if there anything that should be improved, please, feel free to say.

Copy link
Owner

@becheran becheran left a comment

Choose a reason for hiding this comment

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

One improvement remark regarding readability and making it a bit simpler and please have a look for the formatting. Run the formatter again before commiting.

Otherwise looks good to me. Thanks for the contribution

@thiagodejesus
Copy link
Contributor Author

Thanks for the review, I have applied the suggestion and formatted the code properly, the issue with the formatter was some space or tab, unexpected by me.

@becheran
Copy link
Owner

Thanks for the chwnges. Clippy check is still Brocken. Can you please Check the failing Pipeline?

@thiagodejesus
Copy link
Contributor Author

Now its adjusted, sorry about that.

@thiagodejesus
Copy link
Contributor Author

I am seeing that now there are two steps failing, this looks very strange, i gonna try to reproduce them local

@thiagodejesus
Copy link
Contributor Author

About the formatting step, there is two things that looks strange.
The first is that on the CI the failure its pointing to a piece of code that was not changed by this PR.
The second is that running locally the same command as it is on the CI: cargo clippy --all-targets --all-features its working.

About the test step, there is also something strange, miri test its failing with this message: cross-interpreting doctests is not currently supported by Miri I thought that this is strange as it was passing before, so i ran it against this repository without the changes of this PR, and its also failing. So does not looks like a change added by this PR.

I am very curious about why those two actions are failing so I will see if i can find some responses.

@thiagodejesus
Copy link
Contributor Author

The Miri failure its related to some issue on a new nightly release, as mentioned here: rust-lang/miri#4323

@thiagodejesus
Copy link
Contributor Author

About the formatting failure:
So, I did reproduce the formatting issue locally. It was working on my rust 1.85.0 but after update it to 1.87.0 the formatting issue started.
Its not related to the code of this PR as its an issue of the implementation of the PartialEq trait.
Should I fix it on this PR?

About the test failure:
As mentioned earlier looks like some issue with the current nightly version of miri, so we could pin it to a specific version or just wait for the nightly to update fixing the issue, any option looks good to me.

@becheran
Copy link
Owner

Sorry for the flaky and failing pipelines. The code looks just fine. Will try to fix those issues later. Thanks for the contribution.

@becheran becheran merged commit 9c52d55 into becheran:master May 20, 2025
6 of 10 checks passed
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.

2 participants