-
Notifications
You must be signed in to change notification settings - Fork 150
Remove unnecessary VecLike
trait.
#35
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
Conversation
It's not clear to me that this |
} | ||
pub fn is_empty(&self) -> bool { | ||
self.len == 0 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These methods are available via Deref
, right?
This is used to write generic code that works with both |
via IRC:
|
I guess it would be fine to move to style. |
We may want to revisit this, since the style crate no longer needs this (servo/servo#19424), and code that does use it could be converted to use standard traits like |
Remove unused generic from push_applicable_declarations This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35). If we do need to make this function generic in the future, we can do it using standard traits instead. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are removing unused code <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19424) <!-- Reviewable:end -->
Deprecate the VecLike trait This is an update of PR #35. This trait is redundant with existing traits like `Extend` and `Deref`. Its purpose is unclear (you can do a few things with it, but not much) and the one use case I know of has been removed (servo/servo#19424). <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/74) <!-- Reviewable:end -->
…arations (from mbrubeck:veclike); r=emilio This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35). If we do need to make this function generic in the future, we can do it using standard traits instead. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are removing unused code Source-Repo: https://github.com/servo/servo Source-Revision: dbe3136a055008d2c27c7d96f20e0c9ce4b1cb1c --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : fd711a25e3eeb999712269c39a74c99981975a63
…arations (from mbrubeck:veclike); r=emilio This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35). If we do need to make this function generic in the future, we can do it using standard traits instead. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are removing unused code Source-Repo: https://github.com/servo/servo Source-Revision: dbe3136a055008d2c27c7d96f20e0c9ce4b1cb1c
…arations (from mbrubeck:veclike); r=emilio This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35). If we do need to make this function generic in the future, we can do it using standard traits instead. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are removing unused code Source-Repo: https://github.com/servo/servo Source-Revision: dbe3136a055008d2c27c7d96f20e0c9ce4b1cb1c
…arations (from mbrubeck:veclike); r=emilio This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35). If we do need to make this function generic in the future, we can do it using standard traits instead. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are removing unused code Source-Repo: https://github.com/servo/servo Source-Revision: dbe3136a055008d2c27c7d96f20e0c9ce4b1cb1c UltraBlame original commit: 6b3c508ccd771b8e529679a7680e7ba03d40ffca
…arations (from mbrubeck:veclike); r=emilio This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35). If we do need to make this function generic in the future, we can do it using standard traits instead. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are removing unused code Source-Repo: https://github.com/servo/servo Source-Revision: dbe3136a055008d2c27c7d96f20e0c9ce4b1cb1c UltraBlame original commit: 6b3c508ccd771b8e529679a7680e7ba03d40ffca
…arations (from mbrubeck:veclike); r=emilio This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35). If we do need to make this function generic in the future, we can do it using standard traits instead. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are removing unused code Source-Repo: https://github.com/servo/servo Source-Revision: dbe3136a055008d2c27c7d96f20e0c9ce4b1cb1c UltraBlame original commit: 6b3c508ccd771b8e529679a7680e7ba03d40ffca
…arations (from mbrubeck:veclike); r=emilio This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate (servo/rust-smallvec#35). If we do need to make this function generic in the future, we can do it using standard traits instead. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are removing unused code Source-Repo: https://github.com/servo/servo Source-Revision: dbe3136a055008d2c27c7d96f20e0c9ce4b1cb1c
This change is