Skip to content

Commit

Permalink
Cleanup and simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
themkat authored and sagacity committed Aug 31, 2022
1 parent bb4a6b6 commit a448ce8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions mos/src/debugger/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,11 @@ impl CompletionsRequestHandler {
}

impl Handler<CompletionsRequest> for CompletionsRequestHandler {
// TODO: prettify the signature. Why is CompletionsResponse not allowed?
fn handle(
&self,
conn: &mut DebugSession,
args: <CompletionsRequest as Request>::Arguments,
) -> MosResult<<CompletionsRequest as Request>::Response> {
) -> MosResult<CompletionsResponse> {
let registers = {
let adapter = conn.machine_adapter()?;
adapter.registers()?
Expand All @@ -601,8 +600,6 @@ impl Handler<CompletionsRequest> for CompletionsRequestHandler {
}
};

println!("Completion string: {}", curr_completion);

// get the completion candidates
let candidates: Vec<String> = if curr_completion.starts_with("cpu.flags.") {
let (_, after_dot_current) = curr_completion.split_at(10);
Expand Down Expand Up @@ -1060,9 +1057,6 @@ mod tests {
fn completions() -> MosResult<()> {
use mos_testing::assert_unordered_eq;

// TODO: completing in the middle of the word should probably not return the entire word?
// or should it?

let src = r#".test "a" {
ldx #123
foo: nop
Expand Down
1 change: 0 additions & 1 deletion mos/src/debugger/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,6 @@ pub struct CompletionsResponse {
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct CompletionItem {
// TODO: do we need the other fields for our use case?
pub label: String,
}

Expand Down

0 comments on commit a448ce8

Please sign in to comment.