mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Fix clippy::ptr_arg
This commit is contained in:
parent
4e449fb0b0
commit
fafca4cb11
2 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
|
||||||
&mut self,
|
&mut self,
|
||||||
id: ExprId,
|
id: ExprId,
|
||||||
_path: &Option<Path>,
|
_path: &Option<Path>,
|
||||||
fields: &Vec<StructLitField>,
|
fields: &[StructLitField],
|
||||||
spread: &Option<ExprId>,
|
spread: &Option<ExprId>,
|
||||||
db: &impl HirDatabase,
|
db: &impl HirDatabase,
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -49,7 +49,7 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_import_label(name: &str, path: &Vec<SmolStr>) -> String {
|
fn build_import_label(name: &str, path: &[SmolStr]) -> String {
|
||||||
let mut buf = String::with_capacity(64);
|
let mut buf = String::with_capacity(64);
|
||||||
buf.push_str(name);
|
buf.push_str(name);
|
||||||
buf.push_str(" (");
|
buf.push_str(" (");
|
||||||
|
@ -58,7 +58,7 @@ fn build_import_label(name: &str, path: &Vec<SmolStr>) -> String {
|
||||||
buf
|
buf
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fmt_import_path(path: &Vec<SmolStr>, buf: &mut String) {
|
fn fmt_import_path(path: &[SmolStr], buf: &mut String) {
|
||||||
let mut segments = path.iter();
|
let mut segments = path.iter();
|
||||||
if let Some(s) = segments.next() {
|
if let Some(s) = segments.next() {
|
||||||
buf.push_str(&s);
|
buf.push_str(&s);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue