Skip to content

Commit e9b7ff9

Browse files
committed
chore: remove deprecated code
1 parent d8cda6c commit e9b7ff9

2 files changed

Lines changed: 12 additions & 17 deletions

File tree

libs/@local/hashql/ast/src/lower/expander/error.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,19 @@ impl Display for FormatUserPath<'_, '_> {
358358
fn format_absolute_path<'heap>(item: &Item<'heap>, registry: &ModuleRegistry<'heap>) -> String {
359359
use core::iter;
360360

361-
let path = item.absolute_path(registry).into_iter().map(Symbol::unwrap);
361+
#[expect(
362+
clippy::needless_collect,
363+
reason = "debugging code + required for reverse"
364+
)]
365+
let path: Vec<_> = item
366+
.absolute_path_rev(registry)
367+
.map(Symbol::unwrap)
368+
.collect();
362369

363-
iter::once("").chain(path).intersperse("::").collect()
370+
iter::once("")
371+
.chain(path.into_iter().rev())
372+
.intersperse("::")
373+
.collect()
364374
}
365375

366376
struct SpellingSuggestions<'heap, I> {

libs/@local/hashql/core/src/module/item.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,6 @@ impl<'heap> Item<'heap> {
9595
})
9696
}
9797

98-
// TODO: deprecate
99-
#[must_use]
100-
pub fn absolute_path(
101-
&self,
102-
registry: &ModuleRegistry<'heap>,
103-
) -> impl IntoIterator<Item = Symbol<'heap>> {
104-
let mut modules: Vec<_> = self.ancestors(registry).into_iter().collect();
105-
modules.reverse();
106-
107-
modules
108-
.into_iter()
109-
.map(|module| module.name)
110-
.chain(iter::once(self.name))
111-
}
112-
11398
#[must_use]
11499
pub fn absolute_path_rev(
115100
&self,

0 commit comments

Comments
 (0)