fix tiny copy-paste mistake in bevy_text::font_atlas_set (#16667)

This fixes a minor copy-paste mistake in the `FontAtlasSet::is_empty`
method's documentation.

# Objective

- Correct the documentation for that method.

## Solution

- Remove the copy + paste'd docs from `FontAtlasSet::is_empty` and add
something similar to
`alloc::collections::btree_set::BTreeSet::is_empty`.

## Testing

- No testable changes were made. However, the two tests in the
`bevy_text` module still pass.
This commit is contained in:
Barrett Ray 2024-12-09 21:17:09 -06:00 committed by GitHub
parent 277cfa5a4e
commit f6668cdf9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,11 +200,12 @@ impl FontAtlasSet {
}) })
} }
/// Returns the number of font atlases in this set /// Returns the number of font atlases in this set.
pub fn len(&self) -> usize { pub fn len(&self) -> usize {
self.font_atlases.len() self.font_atlases.len()
} }
/// Returns the number of font atlases in this set
/// Returns `true` if the set has no font atlases.
pub fn is_empty(&self) -> bool { pub fn is_empty(&self) -> bool {
self.font_atlases.len() == 0 self.font_atlases.len() == 0
} }