]> git.lizzy.rs Git - rust.git/commitdiff
removed prints
authorJeroen Vannevel <jer_vannevel@outlook.com>
Tue, 11 Jan 2022 21:40:22 +0000 (21:40 +0000)
committerJeroen Vannevel <jer_vannevel@outlook.com>
Fri, 14 Jan 2022 01:32:11 +0000 (01:32 +0000)
crates/ide_assists/src/handlers/merge_match_arms.rs

index 7f9b5f459705b45fba432fcf38233af16276f512..4e09bb2a702210e46fb75b14a22461a6b6bfb6b8 100644 (file)
@@ -52,7 +52,6 @@ pub(crate) fn merge_match_arms(acc: &mut Assists, ctx: &AssistContext) -> Option
                     return false;
                 }
 
-                println!("Checking types");
                 return are_same_types(&current_arm_types, arm, ctx);
             }
             _ => false,
@@ -104,7 +103,6 @@ fn are_same_types(
     for other_arm_type_entry in arm_types {
         let current_arm_type = current_arm_types.get_key_value(&other_arm_type_entry.0);
         if current_arm_type.is_none() {
-            println!("No corresponding type found for {:?}", {other_arm_type_entry});
             return false;
         }
 
@@ -112,7 +110,6 @@ fn are_same_types(
         
         if let (Some(other_arm_type), Some(current_arm_type)) = (other_arm_type_entry.1, unwrapped_current_arm_type) {
             if other_arm_type.original != current_arm_type.original {
-                println!("Type {:?} is different from {:?}", &other_arm_type.original, &current_arm_type.original);
                 return false;
             }
         }
@@ -126,7 +123,6 @@ fn get_arm_types(context: &AssistContext, arm: &MatchArm) -> HashMap<String, Opt
     
     fn recurse(pat: &Option<Pat>, map: &mut HashMap<String, Option<TypeInfo>>, ctx: &AssistContext) {
         if let Some(local_pat) = pat {
-            println!("{:?}", pat);
             match pat {
                 Some(ast::Pat::TupleStructPat(tuple)) => {
                     for field in tuple.fields() {
@@ -142,7 +138,6 @@ fn recurse(pat: &Option<Pat>, map: &mut HashMap<String, Option<TypeInfo>>, ctx:
                 },
                 Some(ast::Pat::IdentPat(ident_pat)) => {
                     if let Some(name) = ident_pat.name() {
-                        println!("Found name: {:?}", name.text().to_string());
                         let pat_type = ctx.sema.type_of_pat(local_pat);
                         map.insert(name.text().to_string(), pat_type);
                     }