luaur_analysis/methods/
path_last.rs1use crate::records::path::Path;
2use crate::type_aliases::component::Component;
3
4impl Path {
5 pub fn path_last(&self) -> Option<Component> {
6 if self.path_empty() {
7 return None;
8 }
9
10 Some(self.components[self.components.len() - 1].clone())
11 }
12}