From 9552c3601c022250cc9665616c1a3888afd5d09b Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Fri, 31 Mar 2023 14:46:42 -0700 Subject: [PATCH] internal: Remove unneeded expression We can't hit this since the `*` case is covered above IIUC --- prql-compiler/src/semantic/context.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/prql-compiler/src/semantic/context.rs b/prql-compiler/src/semantic/context.rs index ec75b7ce5d73..01935c4287d5 100644 --- a/prql-compiler/src/semantic/context.rs +++ b/prql-compiler/src/semantic/context.rs @@ -2,7 +2,6 @@ use anyhow::Result; use enum_as_inner::EnumAsInner; use itertools::Itertools; use serde::{Deserialize, Serialize}; -use std::collections::HashSet; use std::{collections::HashMap, fmt::Debug}; use super::module::{Module, NS_DEFAULT_DB, NS_FRAME, NS_FRAME_RIGHT, NS_INFER, NS_SELF, NS_STD}; @@ -198,13 +197,11 @@ impl Context { } // fallback case: this variable can be from a namespace that we don't know all columns of - let decls = if ident.name != "*" { + let decls = { self.root_mod.lookup(&Ident { path: ident.path.clone(), name: NS_INFER.to_string(), }) - } else { - HashSet::new() }; match decls.len() { 0 => Err(format!("Unknown name {ident}")),