mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 13:33:31 +00:00
unnecessary_cast
This commit is contained in:
parent
daa20725c5
commit
de6f9561f2
3 changed files with 4 additions and 5 deletions
|
@ -181,7 +181,6 @@ non_canonical_partial_ord_impl = "allow"
|
||||||
self_named_constructors = "allow"
|
self_named_constructors = "allow"
|
||||||
too_many_arguments = "allow"
|
too_many_arguments = "allow"
|
||||||
type_complexity = "allow"
|
type_complexity = "allow"
|
||||||
unnecessary_cast = "allow"
|
|
||||||
unnecessary_filter_map = "allow"
|
unnecessary_filter_map = "allow"
|
||||||
unnecessary_lazy_evaluations = "allow"
|
unnecessary_lazy_evaluations = "allow"
|
||||||
unnecessary_mut_passed = "allow"
|
unnecessary_mut_passed = "allow"
|
||||||
|
|
|
@ -297,7 +297,7 @@ impl SearchMode {
|
||||||
SearchMode::Exact => candidate.eq_ignore_ascii_case(query),
|
SearchMode::Exact => candidate.eq_ignore_ascii_case(query),
|
||||||
SearchMode::Prefix => {
|
SearchMode::Prefix => {
|
||||||
query.len() <= candidate.len() && {
|
query.len() <= candidate.len() && {
|
||||||
let prefix = &candidate[..query.len() as usize];
|
let prefix = &candidate[..query.len()];
|
||||||
if case_sensitive {
|
if case_sensitive {
|
||||||
prefix == query
|
prefix == query
|
||||||
} else {
|
} else {
|
||||||
|
@ -446,7 +446,7 @@ fn search_maps(
|
||||||
let end = (value & 0xFFFF_FFFF) as usize;
|
let end = (value & 0xFFFF_FFFF) as usize;
|
||||||
let start = (value >> 32) as usize;
|
let start = (value >> 32) as usize;
|
||||||
let ImportMap { item_to_info_map, importables, .. } = &*import_maps[import_map_idx];
|
let ImportMap { item_to_info_map, importables, .. } = &*import_maps[import_map_idx];
|
||||||
let importables = &importables[start as usize..end];
|
let importables = &importables[start..end];
|
||||||
|
|
||||||
let iter = importables
|
let iter = importables
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
@ -903,7 +903,7 @@ fn emit_def_diagnostic_(
|
||||||
}
|
}
|
||||||
DefDiagnosticKind::InvalidDeriveTarget { ast, id } => {
|
DefDiagnosticKind::InvalidDeriveTarget { ast, id } => {
|
||||||
let node = ast.to_node(db.upcast());
|
let node = ast.to_node(db.upcast());
|
||||||
let derive = node.attrs().nth(*id as usize);
|
let derive = node.attrs().nth(*id);
|
||||||
match derive {
|
match derive {
|
||||||
Some(derive) => {
|
Some(derive) => {
|
||||||
acc.push(
|
acc.push(
|
||||||
|
@ -918,7 +918,7 @@ fn emit_def_diagnostic_(
|
||||||
}
|
}
|
||||||
DefDiagnosticKind::MalformedDerive { ast, id } => {
|
DefDiagnosticKind::MalformedDerive { ast, id } => {
|
||||||
let node = ast.to_node(db.upcast());
|
let node = ast.to_node(db.upcast());
|
||||||
let derive = node.attrs().nth(*id as usize);
|
let derive = node.attrs().nth(*id);
|
||||||
match derive {
|
match derive {
|
||||||
Some(derive) => {
|
Some(derive) => {
|
||||||
acc.push(
|
acc.push(
|
||||||
|
|
Loading…
Reference in a new issue