linebender / linebender/druid

Sameness for fresh clones

Open
#944 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

D-Easy docs help wanted
Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

Would it make sense to add to the doc of Data::same that the following property is recommended (or even required)?

assert!(x.same(&x.clone()))

I'm asking because there were some confusion about how to implement Data::same for im::Vector in https://github.com/bodil/im-rs/issues/117 and https://github.com/bodil/im-rs/issues/129. The current doc of Data::same would even allow the following implementation.

impl Data for Foo {
    fn same(&self, _other: &Self) -> bool {
        false
    }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documentation for the Rust Data::same method and review the linked im-rs issues about implementing it for im::Vector. Clarify whether the x.same(&x.clone()) property is recommended or required, then update the method documentation to state the agreed behavior.】【。

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.