We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Iterator::last
DoubleEndedIterator
1 parent bfe122c commit 99812abCopy full SHA for 99812ab
2 files changed
src/lib.rs
@@ -170,7 +170,7 @@ fn walk_entity_dir(
170
// only base name for all nodes regardless of depth if compose-node-name isn't
171
// enabled.
172
(
173
- cls.split(MAIN_SEPARATOR).last().ok_or(anyhow!(
+ cls.split(MAIN_SEPARATOR).next_back().ok_or(anyhow!(
174
"Can't shorten node name for {}",
175
entry.path().display()
176
))?,
src/node/nodeinfo.rs
@@ -73,7 +73,7 @@ impl NodeInfoMeta {
73
vec![self
74
.parts
75
.iter()
76
- .last()
+ .next_back()
77
.ok_or(anyhow!("Unable to extract last segment from node"))?
78
.to_str()
79
.ok_or(anyhow!("Unable to convert path segment to a string"))?]
0 commit comments