Skip to content

Improve readability of methods on PyRef<PyString> #610

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

Merged
merged 1 commit into from
Mar 6, 2019

Conversation

OddCoincidence
Copy link
Contributor

@OddCoincidence OddCoincidence commented Mar 6, 2019

For some reason it only occurred to me just now that we don't need the arbitrary-self-types rust feature to make the receiver be self. So now it is.

This also adds a PyStringRef alias, since PyRef<PyString> is a mouthful (and feels more natural given we have PyObjectRef).

(What really nice is that this doesn't just make our rust more idiomatic, it's also congruous with python self.)

- Introduce PyStringRef type alias
- Impl python methods on PyStringRef to allow receiver to just be `self`
@codecov-io
Copy link

Codecov Report

Merging #610 into master will decrease coverage by <.01%.
The diff coverage is 69.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #610      +/-   ##
==========================================
- Coverage   40.86%   40.86%   -0.01%     
==========================================
  Files          75       75              
  Lines       17104    17087      -17     
  Branches     4502     4499       -3     
==========================================
- Hits         6990     6983       -7     
+ Misses       8123     8114       -9     
+ Partials     1991     1990       -1
Impacted Files Coverage Δ
vm/src/obj/objstr.rs 34.34% <69.04%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 06e17af...c68dbcc. Read the comment docs.

@cthulahoops cthulahoops merged commit 11d0de2 into master Mar 6, 2019
@windelbouwman windelbouwman deleted the joey/impl-on-pyref branch March 23, 2019 10:47
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.

3 participants