Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dalance committed Jan 12, 2023
1 parent fec5a26 commit 624a357
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/analyzer/src/handlers/check_module_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl<'a> Handler for CheckModuleInstance<'a> {
impl<'a> VerylGrammarTrait for CheckModuleInstance<'a> {
fn inst_declaration(&mut self, arg: &InstDeclaration) -> Result<()> {
if let HandlerPoint::Before = self.point {
let path = &SymbolPath::new(&vec![arg.identifier0.identifier_token.token.text]);
let path = &SymbolPath::new(&[arg.identifier0.identifier_token.token.text]);

let mut connected_ports = Vec::new();
if let Some(ref x) = arg.inst_declaration_opt1 {
Expand Down
2 changes: 1 addition & 1 deletion crates/analyzer/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl fmt::Display for SymbolKind {
stringifier.expression(x);
format!("enum member = {}", stringifier.as_str())
} else {
format!("enum member")
"enum member".to_string()
}
}
SymbolKind::Modport(x) => {
Expand Down
4 changes: 2 additions & 2 deletions crates/languageserver/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl LanguageServer for Backend {
if let Some(token) = finder.token {
if let Some(namespace) = namespace_table::get(token.id) {
let path = if finder.token_group.is_empty() {
SymbolPath::new(&vec![token.text])
SymbolPath::new(&[token.text])
} else {
SymbolPath::from(finder.token_group.as_slice())
};
Expand Down Expand Up @@ -355,7 +355,7 @@ impl LanguageServer for Backend {
if let Some(token) = finder.token {
if let Some(namespace) = namespace_table::get(token.id) {
let path = if finder.token_group.is_empty() {
SymbolPath::new(&vec![token.text])
SymbolPath::new(&[token.text])
} else {
SymbolPath::from(finder.token_group.as_slice())
};
Expand Down
2 changes: 1 addition & 1 deletion crates/metadata/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl FromStr for Metadata {
type Err = MetadataError;

fn from_str(s: &str) -> Result<Self, Self::Err> {
let metadata: Metadata = toml::from_str(&s)?;
let metadata: Metadata = toml::from_str(s)?;
Ok(metadata)
}
}
Expand Down

0 comments on commit 624a357

Please sign in to comment.