mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
refactor(lsp): remove unused code (#9897)
This commit is contained in:
parent
39a48fc424
commit
1a4b2a4ec9
1 changed files with 0 additions and 15 deletions
|
@ -1345,7 +1345,6 @@ struct Response {
|
|||
}
|
||||
|
||||
struct State<'a> {
|
||||
asset: Option<String>,
|
||||
last_id: usize,
|
||||
response: Option<Response>,
|
||||
state_snapshot: StateSnapshot,
|
||||
|
@ -1355,7 +1354,6 @@ struct State<'a> {
|
|||
impl<'a> State<'a> {
|
||||
fn new(state_snapshot: StateSnapshot) -> Self {
|
||||
Self {
|
||||
asset: None,
|
||||
last_id: 1,
|
||||
response: None,
|
||||
state_snapshot,
|
||||
|
@ -1673,18 +1671,6 @@ fn script_version(
|
|||
Ok(None)
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct SetAssetArgs {
|
||||
text: Option<String>,
|
||||
}
|
||||
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn set_asset(state: &mut State, args: SetAssetArgs) -> Result<bool, AnyError> {
|
||||
state.asset = args.text;
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
/// Create and setup a JsRuntime based on a snapshot. It is expected that the
|
||||
/// supplied snapshot is an isolate that contains the TypeScript language
|
||||
/// server.
|
||||
|
@ -1708,7 +1694,6 @@ pub fn start(debug: bool) -> Result<JsRuntime, AnyError> {
|
|||
runtime.register_op("op_respond", op(respond));
|
||||
runtime.register_op("op_script_names", op(script_names));
|
||||
runtime.register_op("op_script_version", op(script_version));
|
||||
runtime.register_op("op_set_asset", op(set_asset));
|
||||
|
||||
let init_config = json!({ "debug": debug });
|
||||
let init_src = format!("globalThis.serverInit({});", init_config);
|
||||
|
|
Loading…
Reference in a new issue