From c50b4579ec842ac7c1f52e0e3c834d50fc9cd1bb Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:35:29 +0530 Subject: clippy::useless_return --- crates/ide/src/doc_links.rs | 2 +- crates/ide/src/syntax_highlighting/highlight.rs | 4 ++-- crates/ide/src/syntax_highlighting/inject.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/doc_links.rs b/crates/ide/src/doc_links.rs index 774952d96..57ae9455b 100644 --- a/crates/ide/src/doc_links.rs +++ b/crates/ide/src/doc_links.rs @@ -192,7 +192,7 @@ pub(crate) fn doc_attributes( ast::TupleField(it) => sema.to_def(&it).map(|def| (def.attrs(sema.db), Definition::Field(def))), ast::Macro(it) => sema.to_def(&it).map(|def| (def.attrs(sema.db), Definition::Macro(def))), // ast::Use(it) => sema.to_def(&it).map(|def| (Box::new(it) as _, def.attrs(sema.db))), - _ => return None + _ => None } } } diff --git a/crates/ide/src/syntax_highlighting/highlight.rs b/crates/ide/src/syntax_highlighting/highlight.rs index 8c0e553c0..e2cec21bc 100644 --- a/crates/ide/src/syntax_highlighting/highlight.rs +++ b/crates/ide/src/syntax_highlighting/highlight.rs @@ -527,9 +527,9 @@ fn highlight_name_ref_by_syntax( match parent.kind() { METHOD_CALL_EXPR => { - return ast::MethodCallExpr::cast(parent) + ast::MethodCallExpr::cast(parent) .and_then(|it| highlight_method_call(sema, krate, &it)) - .unwrap_or_else(|| SymbolKind::Function.into()); + .unwrap_or_else(|| SymbolKind::Function.into()) } FIELD_EXPR => { let h = HlTag::Symbol(SymbolKind::Field); diff --git a/crates/ide/src/syntax_highlighting/inject.rs b/crates/ide/src/syntax_highlighting/inject.rs index 883252c0e..ec43c8579 100644 --- a/crates/ide/src/syntax_highlighting/inject.rs +++ b/crates/ide/src/syntax_highlighting/inject.rs @@ -232,7 +232,7 @@ fn find_doc_string_in_attr(attr: &hir::Attr, it: &ast::Attr) -> Option return None, + _ => None, } } -- cgit v1.2.3