From cf3042f8818deb67636507241e853ffb6ab2daf3 Mon Sep 17 00:00:00 2001 From: ShuiRuTian <158983297@qq.com> Date: Tue, 12 Jan 2021 00:21:43 +0800 Subject: format --- crates/rust-analyzer/src/handlers.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index 1f21533cb..53e64f106 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs @@ -447,9 +447,11 @@ pub(crate) fn handle_will_rename_files( } else { let old_name = from_path.file_stem()?.to_str()?; let new_name = to_path.file_stem()?.to_str()?; - match(old_name,new_name){ - ("mod","mod") =>Some((snap.url_to_file_id(&from).ok()?, new_name.to_string())), - _=>None + match (old_name, new_name) { + ("mod", "mod") => { + Some((snap.url_to_file_id(&from).ok()?, new_name.to_string())) + } + _ => None, } } } -- cgit v1.2.3