Skip to content

Commit 8fd8e30

Browse files
committed
cargo fmt
1 parent 04224a6 commit 8fd8e30

File tree

8 files changed

+30
-24
lines changed

8 files changed

+30
-24
lines changed

engine/language_server/src/cors_bypass_proxy.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::collections::HashMap;
2+
13
use anyhow::Result;
24
use axum::{
35
body::Body,
@@ -9,7 +11,6 @@ use axum::{
911
};
1012
use mime_guess::from_path;
1113
use serde::Deserialize;
12-
use std::collections::HashMap;
1314
use tokio::{fs, net::TcpListener};
1415
use tower_http::cors::{Any, CorsLayer};
1516

@@ -102,8 +103,10 @@ impl ProxyError {
102103
}
103104

104105
pub fn create_proxy_router() -> Router<ProxyConfig> {
105-
use axum::http::header::{AUTHORIZATION, CONTENT_TYPE};
106-
use axum::http::HeaderName;
106+
use axum::http::{
107+
header::{AUTHORIZATION, CONTENT_TYPE},
108+
HeaderName,
109+
};
107110

108111
// Create CORS layer that allows all origins and methods
109112
let cors = CorsLayer::new()

engine/language_server/src/server.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use lsp_types::{
1919
TextDocumentSyncKind, TextDocumentSyncOptions, TextDocumentSyncSaveOptions, Url,
2020
WorkspaceClientCapabilities, WorkspaceFoldersServerCapabilities, WorkspaceServerCapabilities,
2121
};
22+
use playground_server::{FrontendMessage, LangServerToWasmMessage, PreLangServerToWasmMessage};
2223
use schedule::Task;
2324
use serde::{Deserialize, Serialize};
2425
use tokio::sync::{broadcast, RwLock};
@@ -27,8 +28,6 @@ use self::{
2728
connection::{Connection, ConnectionInitializer},
2829
schedule::event_loop_thread,
2930
};
30-
use playground_server::{FrontendMessage, LangServerToWasmMessage, PreLangServerToWasmMessage};
31-
3231
use crate::{
3332
baml_project::file_utils::{find_baml_src, find_top_level_parent},
3433
session::{AllSettings, ClientSettings, Session},

engine/language_server/src/server/api/requests/diagnostic.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
use std::{borrow::Cow, sync::Arc};
22

3-
use parking_lot::Mutex;
4-
53
use lsp_types::{
64
request::DocumentDiagnosticRequest, DocumentDiagnosticParams, DocumentDiagnosticReport,
75
DocumentDiagnosticReportResult, FullDocumentDiagnosticReport,
86
RelatedFullDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport,
97
UnchangedDocumentDiagnosticReport, Url,
108
};
9+
use parking_lot::Mutex;
1110

1211
use crate::{
1312
baml_project::Project,

engine/language_server/src/server/api/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
//! A stateful LSP implementation that calls into the Ruff API.
22
3-
use parking_lot::Mutex;
43
use std::sync::Arc;
54

65
// use crate::baml_project::ProjectDatabase;
76
use lsp_types::notification::Notification as LSPNotification;
87
use lsp_types::request::Request;
8+
use parking_lot::Mutex;
99

1010
use super::notifications::DidSaveTextDocument;
1111
use crate::{

engine/playground-server/src/bin/playground_barebones.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
use std::collections::HashMap;
2+
13
use playground_server::{
24
pick_ports, AppState, FrontendMessage, LangServerToWasmMessage, PlaygroundServer,
35
PortConfiguration, PreLangServerToWasmMessage,
46
};
5-
use std::collections::HashMap;
67
use tokio::io::AsyncBufReadExt;
78
use tracing_subscriber::EnvFilter;
89

engine/playground-server/src/handlers/websocket_rpc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use axum::{
33
response::IntoResponse,
44
};
55
use futures::{SinkExt, StreamExt};
6-
76
use serde_json::Value;
87

98
use crate::{definitions::PreLangServerToWasmMessage, server::AppState};

engine/playground-server/src/server.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
use std::{io::Cursor, path::PathBuf, time::Duration};
2+
13
use anyhow::Context;
24
use axum::{routing::get, Router};
35
use flate2::read::GzDecoder;
46
use sha2::{Digest, Sha256};
5-
use std::io::Cursor;
6-
use std::path::PathBuf;
7-
use std::time::Duration;
87
use tar::Archive;
98
use tokio::{net::TcpListener, sync::broadcast};
109
use tower_http::services::ServeDir;

engine/tools/src/bin/language-server-hot-reload.rs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
use std::{
2+
collections::VecDeque,
3+
io::{self, Write},
4+
path::Path,
5+
process::{Child, Command, Stdio},
6+
sync::{mpsc, Arc, Mutex},
7+
time::{Duration, SystemTime},
8+
};
9+
110
use anyhow::Result;
2-
use notify_debouncer_full::notify::Watcher;
311
use notify_debouncer_full::{
4-
new_debouncer, notify::RecursiveMode, DebounceEventResult, Debouncer, FileIdMap,
12+
new_debouncer,
13+
notify::{RecursiveMode, Watcher},
14+
DebounceEventResult, Debouncer, FileIdMap,
15+
};
16+
use tokio::{
17+
io::{AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncWriteExt, BufReader},
18+
process::{Child as TokioChild, Command as TokioCommand},
19+
sync::watch,
520
};
6-
use std::collections::VecDeque;
7-
use std::io::{self, Write};
8-
use std::path::Path;
9-
use std::process::{Child, Command, Stdio};
10-
use std::sync::{mpsc, Arc, Mutex};
11-
use std::time::{Duration, SystemTime};
12-
use tokio::io::{AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncWriteExt, BufReader};
13-
use tokio::process::{Child as TokioChild, Command as TokioCommand};
14-
use tokio::sync::watch;
1521
use tracing::{info, warn};
1622
use tracing_subscriber::{EnvFilter, FmtSubscriber};
1723

0 commit comments

Comments
 (0)