Skip to content

Implement Rope::is_instance()#11

Open
truchi wants to merge 1 commit into
noib3:mainfrom
truchi:is_instance
Open

Implement Rope::is_instance()#11
truchi wants to merge 1 commit into
noib3:mainfrom
truchi:is_instance

Conversation

@truchi

@truchi truchi commented Jul 24, 2023

Copy link
Copy Markdown

Hello,

Following up on #6 (long time no see 😄), here is Rope::is_instance().
Documentation taken from ropey's, test taken from ropey's.

What do you think about that?
Thanks

@truchi truchi changed the title implement Rope::is_intance() Implement Rope::is_intance() Jul 24, 2023
@truchi truchi changed the title Implement Rope::is_intance() Implement Rope::is_instance() Jul 24, 2023
Comment thread src/rope/rope.rs
/// memory locations (not instances). Importantly, two clones that
/// post-cloning are modified identically will *not* be instances
/// anymore, even though they will have equal contents.
///

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

To be consistent w/ all the other public methods we should add an # Examples section to show in code how this works.

Comment thread src/rope/rope.rs
/// post-cloning are modified identically will *not* be instances
/// anymore, even though they will have equal contents.
///
/// Runs in O(1) time.

@noib3 noib3 Jul 31, 2023

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This time complexity can be removed since none of the other methods mention theirs.

@noib3 noib3 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hey, sorry for the long wait. Lgtm apart from the 2 comments regarding the docs.

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