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

feat(core/types): add new buffer util fns #4598

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hanxuanliang
Copy link
Contributor

Close #4593

@hanxuanliang
Copy link
Contributor Author

@Xuanwo

I have implemented the split fn now. I would like to ask, how can I test if my code is okay? Are there any areas that need to be supplemented with unit tests?

Thank you for taking the time to assist me with this task.

core/src/types/buffer.rs Outdated Show resolved Hide resolved
@Xuanwo
Copy link
Member

Xuanwo commented May 11, 2024

I have implemented the split fn now. I would like to ask, how can I test if my code is okay?

We can add test cases in the tests mod directly.

/// The portion before the index is stored in the `left` object, while the portion
/// after the index is removed from the current object (`self`).
#[inline]
pub fn split_to(&mut self, at: usize) -> Self {
Copy link
Member

Choose a reason for hiding this comment

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

Hi, would you like to add test cases for them?

Copy link
Member

Choose a reason for hiding this comment

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

Kindly cc @hanxuanliang for a look.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry that the issue has been delayed recently due to personal matters. I will finish the following pr content at the weekend

Copy link
Member

Choose a reason for hiding this comment

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

I'm sorry that the issue has been delayed recently due to personal matters. I will finish the following pr content at the weekend

There's no hurry; I just want an update on the current status. You can return at any time.

Copy link
Member

Choose a reason for hiding this comment

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

@hanxuanliang Maybe this time? 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have been sailing in the A-stock market for a while, and finally have some time to pay off the accumulated debt of Rust. Wait for me!

Copy link
Member

Choose a reason for hiding this comment

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

Let's go, lol :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buffer should support split_to and split_off
3 participants