Skip to content

Commit

Permalink
Delete the context object from the DAP server
Browse files Browse the repository at this point in the history
Summary: Newer clippy managed to spot the field was dead. We didn't use it, and it's not clear we ever would.

Reviewed By: stepancheg

Differential Revision: D31616030

fbshipit-source-id: 768fa81cde7a25b5997f9ade3ba908b76ac74919
  • Loading branch information
ndmitchell authored and facebook-github-bot committed Oct 14, 2021
1 parent f8ad1b6 commit a804ccd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions starlark/bin/dap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ use starlark::{
syntax::{AstModule, Dialect},
};

use crate::eval::{dialect, globals, Context};
use crate::eval::{dialect, globals};

mod library;

#[derive(Debug)]
struct Backend {
client: Client,
starlark: Context,

file: Mutex<Option<String>>,

// These breakpoints must all match statements as per before_stmt.
Expand Down Expand Up @@ -380,11 +378,10 @@ impl DebugServer for Backend {
}
}

pub fn server(starlark: Context) {
pub fn server() {
let (sender, receiver) = channel();
DapService::run(|client| Backend {
client,
starlark,
breakpoints: Default::default(),
disable_breakpoints: Default::default(),
file: Default::default(),
Expand Down
2 changes: 1 addition & 1 deletion starlark/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ fn main() -> anyhow::Result<()> {
ctx.run = false;
lsp::server(ctx)?;
} else if args.dap {
dap::server(ctx)
dap::server()
}

if !args.json {
Expand Down

0 comments on commit a804ccd

Please sign in to comment.