Clippy-fix explicit auto-deref
Seems like these can be safely fixed. With one, I was particularly surprised -- `Some(pats) => &**pats,` in body.rs? ``` cargo clippy --fix -- -A clippy::all -D clippy::explicit_auto_deref ```
This commit is contained in:
@@ -128,7 +128,7 @@ impl fmt::Display for CrateName {
|
||||
impl ops::Deref for CrateName {
|
||||
type Target = str;
|
||||
fn deref(&self) -> &str {
|
||||
&*self.0
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ impl fmt::Display for CrateDisplayName {
|
||||
impl ops::Deref for CrateDisplayName {
|
||||
type Target = str;
|
||||
fn deref(&self) -> &str {
|
||||
&*self.crate_name
|
||||
&self.crate_name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ pub trait SourceDatabase: FileLoader + std::fmt::Debug {
|
||||
fn parse_query(db: &dyn SourceDatabase, file_id: FileId) -> Parse<ast::SourceFile> {
|
||||
let _p = profile::span("parse_query").detail(|| format!("{:?}", file_id));
|
||||
let text = db.file_text(file_id);
|
||||
SourceFile::parse(&*text)
|
||||
SourceFile::parse(&text)
|
||||
}
|
||||
|
||||
/// We don't want to give HIR knowledge of source roots, hence we extract these
|
||||
|
||||
Reference in New Issue
Block a user