Skip to content

Remove get method from InternedString - #21505

Merged
bors merged 14 commits into
rust-lang:masterfrom
GuillaumeGomez:interned_string
Feb 7, 2015
Merged

bors merged 14 commits into
rust-lang:masterfrom
GuillaumeGomez:interned_string

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

It's in order to make the code more homogeneous.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

No feedback ?

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

r? @alexcrichton

@alexcrichton

Copy link
Copy Markdown
Member

Thanks! The Str trait currently isn't necessarily meant for implementations as it may not survive stabilization of the std::str module. The get method can probably be removed entirely in favor of the Deref implementation, however.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Okay ! Then do I just remove the Str trait and the get method ?

@alexcrichton

Copy link
Copy Markdown
Member

Yeah that should work just fine.

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+ 4e53266

Feel free to ping the PR when it gets updated, sadly github doesn't send out notifications on a force push!

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

My bad, I didn't think about that ! Thanks !

@bors

bors commented Feb 2, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 4e53266 with merge 4f559b0...

@bors

bors commented Feb 2, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@alexcrichton: it should be ready now !

@alexcrichton

Copy link
Copy Markdown
Member

Thanks! In general though you should never need to call deref manually. If for example you have foo.deref().bar() you can actually just call it foo.bar(). If you have foo.deref() then you can replace it with &foo[] (in the case of slicing) or &*foo in the case of a raw pointer.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

I found this writing:

foo.deref()

beautifuler than this one:

&*foo

But I can change it if you prefer ! At least I'll rebase on the master to solve merge conflicts.

@alexcrichton

Copy link
Copy Markdown
Member

I think that deref coercions may be in a snapshot now so instead of foo.deref() I believe you can pass &foo (as opposed to &*foo)

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@alexcrichton: It's (finally) ready to be merged !

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+ d6bfb9a

@bors

bors commented Feb 4, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit d6bfb9a with merge 4495d7d...

@bors

bors commented Feb 4, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-linux-64-x-android-t

@alexcrichton

Copy link
Copy Markdown
Member

@bors: retry

@bors

bors commented Feb 4, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit d6bfb9a with merge 2ba5a04...

@bors

bors commented Feb 4, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-nopt-t

@alexcrichton

Copy link
Copy Markdown
Member

@GuillaumeGomez the most recent failure is the more relevant one.

Also, in light of #21916 you may want to replace as many &foo[] with &foo as possible to help prevent churn when [] is switched to [..].

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@alexcrichton: Ok ! Just like you said. I update my code and let's try again !

@GuillaumeGomez GuillaumeGomez changed the title Add Str trait to InternedString, set get method deprecated Remove get method from InternedString Feb 4, 2015
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Tests worked. @alexcrichton, r+ please ?

@alexcrichton

Copy link
Copy Markdown
Member

@GuillaumeGomez could you squash some of these commits together as well? Mainly just the "fix foo" commits which don't necessarily need to exist.

Fixes run build error

Fix test failure

Fix tests' errors
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Done !

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+ a2e01c6

@bors

bors commented Feb 6, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a2e01c6 with merge bfe1453...

@bors

bors commented Feb 6, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-linux-32-opt

@alexcrichton

Copy link
Copy Markdown
Member

@bors: retry

@bors

bors commented Feb 7, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a2e01c6 with merge 7ebf9bc...

bors added a commit that referenced this pull request Feb 7, 2015
It's in order to make the code more homogeneous.
@bors

bors commented Feb 7, 2015

Copy link
Copy Markdown
Collaborator

@bors
bors merged commit a2e01c6 into rust-lang:master Feb 7, 2015
@GuillaumeGomez
GuillaumeGomez deleted the interned_string branch February 7, 2015 11:42
renato-zannon added a commit to renato-zannon/racer that referenced this pull request Feb 8, 2015
lnicola pushed a commit to lnicola/rust that referenced this pull request Feb 23, 2026
…yarn/editors/code/lodash-4.17.23

Bump lodash from 4.17.21 to 4.17.23 in /editors/code
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.

5 participants