mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Small fixes
This commit is contained in:
parent
8089a227f4
commit
53a73de3d1
2 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ pub(crate) fn ssr_assists(
|
||||||
let mut ssr_assists = Vec::with_capacity(2);
|
let mut ssr_assists = Vec::with_capacity(2);
|
||||||
|
|
||||||
let (match_finder, comment_range) = match ide_ssr::ssr_from_comment(db, frange) {
|
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,
|
None => return ssr_assists,
|
||||||
};
|
};
|
||||||
let id = AssistId("ssr", AssistKind::RefactorRewrite);
|
let id = AssistId("ssr", AssistKind::RefactorRewrite);
|
||||||
|
|
|
@ -28,7 +28,7 @@ pub(crate) use crate::assist_context::{AssistContext, Assists};
|
||||||
|
|
||||||
pub use assist_config::AssistConfig;
|
pub use assist_config::AssistConfig;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub enum AssistKind {
|
pub enum AssistKind {
|
||||||
// FIXME: does the None variant make sense? Probably not.
|
// FIXME: does the None variant make sense? Probably not.
|
||||||
None,
|
None,
|
||||||
|
@ -91,7 +91,7 @@ impl FromStr for AssistKind {
|
||||||
|
|
||||||
/// Unique identifier of the assist, should not be shown to the user
|
/// Unique identifier of the assist, should not be shown to the user
|
||||||
/// directly.
|
/// directly.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub struct AssistId(pub &'static str, pub AssistKind);
|
pub struct AssistId(pub &'static str, pub AssistKind);
|
||||||
|
|
||||||
/// A way to control how many asssist to resolve during the assist resolution.
|
/// A way to control how many asssist to resolve during the assist resolution.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue