Skip to content

Commit

Permalink
chore: cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind committed May 20, 2022
1 parent 14b4c50 commit 80fe07d
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions libflux/flux-core/src/semantic/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,18 +365,6 @@ impl<'a> Converter<'a> {
std::mem::take(&mut self.symbols.package_info)
}

fn define_symbol(
&mut self,
package: Option<&str>,
name: &str,
comments: &[ast::Comment],
_base: &ast::BaseNode,
) -> Symbol {
let name = self.symbols.insert(package, name, comments);

name
}

pub(crate) fn convert_package(&mut self, pkg: &ast::Package) -> Package {
let package = pkg.package.clone();

Expand Down Expand Up @@ -435,7 +423,7 @@ impl<'a> Converter<'a> {
let (import_symbol, alias) = match &imp.alias {
None => {
let name = path.rsplit_once('/').map_or(&path[..], |t| t.1);
(self.define_symbol(None, name, &[], &imp.base), None)
(self.symbols.insert(None, name, &[]), None)
}
Some(id) => {
let id = self.define_identifier(None, id, &imp.base.comments);
Expand Down Expand Up @@ -1189,7 +1177,7 @@ impl<'a> Converter<'a> {
id: &ast::Identifier,
comments: &[ast::Comment],
) -> Identifier {
let name = self.define_symbol(package, &id.name, comments, &id.base);
let name = self.symbols.insert(package, &id.name, comments);
Identifier {
loc: id.base.location.clone(),
name,
Expand Down

0 comments on commit 80fe07d

Please sign in to comment.