Skip to content

Commit

Permalink
fix: clippy::double_ended_iterator_last lint
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Jan 13, 2025
1 parent feb1ee3 commit e44051d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Use new language/library features added between Rust 1.78-1.82 (internal)

### Fixed
- New clippy lints

## [0.19.0] - 2025-01-10

### Highlights
Expand Down
7 changes: 6 additions & 1 deletion zarrs/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,12 @@ impl Node {
/// Returns the name of the node.
#[must_use]
pub fn name(&self) -> NodeName {
let name = self.path.as_str().split('/').last().unwrap_or_default();
let name = self
.path
.as_str()
.split('/')
.next_back()
.unwrap_or_default();
unsafe { NodeName::new_unchecked(name) }
}

Expand Down

0 comments on commit e44051d

Please sign in to comment.