mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 17:36:19 +04:00
types: simplify working with client's launch args
This commit is contained in:
parent
6bb653f820
commit
aac586b546
@ -33,10 +33,7 @@ pub async fn main() -> Result<()> {
|
||||
program: "/tmp/godebug/main".to_owned(),
|
||||
};
|
||||
|
||||
println!(
|
||||
"launch: {:?}",
|
||||
client.launch(serde_json::to_value(args)?).await
|
||||
);
|
||||
println!("launch: {:?}", client.launch(args).await);
|
||||
|
||||
println!(
|
||||
"breakpoints: {:#?}",
|
||||
|
@ -372,8 +372,9 @@ pub async fn disconnect(&mut self) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn launch(&mut self, args: Value) -> Result<()> {
|
||||
self.request("launch".to_owned(), Some(args)).await?;
|
||||
pub async fn launch(&mut self, args: impl Serialize) -> Result<()> {
|
||||
self.request("launch".to_owned(), to_value(args).ok())
|
||||
.await?;
|
||||
|
||||
match self
|
||||
.server_rx
|
||||
|
Loading…
Reference in New Issue
Block a user