aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assist_ctx.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/assist_ctx.rs')
-rw-r--r--crates/ra_assists/src/assist_ctx.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assist_ctx.rs b/crates/ra_assists/src/assist_ctx.rs
index c25d2e323..62182cf03 100644
--- a/crates/ra_assists/src/assist_ctx.rs
+++ b/crates/ra_assists/src/assist_ctx.rs
@@ -166,8 +166,11 @@ impl<'a> AssistGroup<'a> {
166 } 166 }
167 167
168 pub(crate) fn finish(self) -> Option<Assist> { 168 pub(crate) fn finish(self) -> Option<Assist> {
169 assert!(!self.assists.is_empty()); 169 if self.assists.is_empty() {
170 Some(Assist(self.assists)) 170 None
171 } else {
172 Some(Assist(self.assists))
173 }
171 } 174 }
172} 175}
173 176