]> git.lizzy.rs Git - rust.git/commitdiff
Small fixes
authorKirill Bulatov <mail4score@gmail.com>
Mon, 3 May 2021 15:44:58 +0000 (18:44 +0300)
committerKirill Bulatov <mail4score@gmail.com>
Mon, 3 May 2021 15:45:30 +0000 (18:45 +0300)
crates/ide/src/ssr.rs
crates/ide_assists/src/lib.rs

index 97ad66d35897e7c42233111d178c59953ea8bd64..57ec80261402ed6ab052da60ae21cec7af35157a 100644 (file)
@@ -13,7 +13,7 @@ pub(crate) fn ssr_assists(
     let mut ssr_assists = Vec::with_capacity(2);
 
     let (match_finder, comment_range) = match ide_ssr::ssr_from_comment(db, frange) {
-        Some((match_finder, comment_range)) => (match_finder, comment_range),
+        Some(ssr_data) => ssr_data,
         None => return ssr_assists,
     };
     let id = AssistId("ssr", AssistKind::RefactorRewrite);
index 5a0047f03731c8f7f84e95b4da805876e816df62..723531078f19a71bea97e79ff6115de5f0bc1ad1 100644 (file)
@@ -28,7 +28,7 @@ macro_rules! eprintln {
 
 pub use assist_config::AssistConfig;
 
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
 pub enum AssistKind {
     // FIXME: does the None variant make sense? Probably not.
     None,
@@ -91,7 +91,7 @@ fn from_str(s: &str) -> Result<Self, Self::Err> {
 
 /// Unique identifier of the assist, should not be shown to the user
 /// directly.
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
 pub struct AssistId(pub &'static str, pub AssistKind);
 
 /// A way to control how many asssist to resolve during the assist resolution.