You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most functions taking char as input, specially those taking self with a small struct only having one or two char, should be migrated to take self instead of &self.
Some of the clippy warnings:
warning: this argument is passed by reference, but would be more efficient if passed by value
--> unic/char/range/src/range.rs:180:21
|
180 | pub fn contains(&self, ch: char) -> bool {
| ^^^^^ help:consider passing by value instead: `self`
|
= note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#trivially_copy_pass_by_ref
warning: this argument is passed by reference, but would be more efficient if passed by value
--> unic/char/range/src/range.rs:190:21
|
190 | pub fn cmp_char(&self, ch: char) -> Ordering{
| ^^^^^ help: consider passing by value instead: `self`
|
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#trivially_copy_pass_by_ref
warning: this argument is passed by reference, but would be more efficient if passed by value
--> unic/char/range/src/range.rs:203:16
|
203 | pub fn len(&self) -> usize {
| ^^^^^ help: consider passing by value instead: `self`
|
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#trivially_copy_pass_by_ref
warning: this argument is passed by reference, but would be more efficient if passed by value
--> unic/char/range/src/range.rs:208:21
|
208 | pub fn is_empty(&self) -> bool {
| ^^^^^ help: consider passing by value instead: `self`
|
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#trivially_copy_pass_by_ref
warning: this argument is passed by reference, but would be more efficient if passed by value
--> unic/char/range/src/range.rs:213:17
|
213 | pub fn iter(&self) -> CharIter{
| ^^^^^ help: consider passing by value instead: `self`
|
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#trivially_copy_pass_by_ref
The text was updated successfully, but these errors were encountered:
237: travis: Enable Windows and MacOS builds r=behnam a=behnam
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/open-i18n/rust-unic/237)
<!-- Reviewable:end -->
252: Clippy fixes and changing refs to Copy r=CAD97 a=JamesHinshelwood
Updated clippy allows from `cfg_attr` to proc-macro style.
Fixed#241 + more - Changed a few `impl`s to take `self` instead of `&self`, when they are `Copy` types.
`cargo clippy` should run without any warnings now.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/open-i18n/rust-unic/252)
<!-- Reviewable:end -->
Co-authored-by: Behnam Esfahbod <[email protected]>
Co-authored-by: JamesHinshelwood <[email protected]>
252: Clippy fixes and changing refs to Copy r=CAD97 a=JamesHinshelwood
Updated clippy allows from `cfg_attr` to proc-macro style.
Fixed#241 + more - Changed a few `impl`s to take `self` instead of `&self`, when they are `Copy` types.
`cargo clippy` should run without any warnings now.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/open-i18n/rust-unic/252)
<!-- Reviewable:end -->
Co-authored-by: JamesHinshelwood <[email protected]>
Most functions taking
char
as input, specially those takingself
with a small struct only having one or twochar
, should be migrated to takeself
instead of&self
.Some of the clippy warnings:
The text was updated successfully, but these errors were encountered: