Skip to content
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

icu_capi clippy cleanup #4355

Merged
merged 3 commits into from
Nov 27, 2023
Merged

icu_capi clippy cleanup #4355

merged 3 commits into from
Nov 27, 2023

Conversation

robertbastian
Copy link
Member

No description provided.

#[diplomat::attr(dart, rename = "length")]
pub fn len(&self) -> usize {
self.0.len()
}

/// Whether this map is empty
pub fn is_empty(&self) -> bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: I don't think we should have this over ffi, it's very much a Rust convention

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using foo.isEmpty() instead of foo.length() == 0 is a readability improvement that is mandated by many style guides and languages. This means we need to expose this in order to have idiomatic FFI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess, though we should probably be applying more renames then

(Not that we can pre-JS HIR)

@robertbastian robertbastian merged commit 0197253 into unicode-org:main Nov 27, 2023
29 checks passed
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.

2 participants