diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-23 23:27:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-23 23:27:58 +0100 |
commit | 275dee60e71225a9c6c4b3b4ea7ffe4c6ecb4d87 (patch) | |
tree | 13ed3ab7e825a81085e8dcc5efeee417416b86cf /runtime/inspector_server.rs | |
parent | edab8f2fd48efddc19eb0032955fee4b5dbf76e6 (diff) |
refactor: make version and user_agent &'static str (#18400)
These caused a bunch of unnecessary allocations on each startup.
Diffstat (limited to 'runtime/inspector_server.rs')
-rw-r--r-- | runtime/inspector_server.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/inspector_server.rs b/runtime/inspector_server.rs index e5f3a4f09..d65e813cb 100644 --- a/runtime/inspector_server.rs +++ b/runtime/inspector_server.rs @@ -40,7 +40,7 @@ pub struct InspectorServer { } impl InspectorServer { - pub fn new(host: SocketAddr, name: String) -> Self { + pub fn new(host: SocketAddr, name: &'static str) -> Self { let (register_inspector_tx, register_inspector_rx) = mpsc::unbounded::<InspectorInfo>(); @@ -220,7 +220,7 @@ async fn server( host: SocketAddr, register_inspector_rx: UnboundedReceiver<InspectorInfo>, shutdown_server_rx: oneshot::Receiver<()>, - name: String, + name: &str, ) { let inspector_map_ = Rc::new(RefCell::new(HashMap::<Uuid, InspectorInfo>::new())); |