Skip to content

Commit

Permalink
cleanup, better names
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed May 16, 2023
1 parent 99d076e commit 8a42066
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/turbopack-dev-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use hyper::{
Request, Response, Server,
};
use socket2::{Domain, Protocol, Socket, Type};
use tracing::{debug, event, info_span, span, warn, Instrument, Level, Span};
use tracing::{event, info_span, Instrument, Level, Span};
use turbo_tasks::{
run_once_with_reason, trace::TraceRawVcs, util::FormatDuration, CollectiblesSource, RawVc,
TransientInstance, TransientValue, TurboTasksApi,
Expand Down
5 changes: 2 additions & 3 deletions crates/turbopack-dev-server/src/update/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use hyper_tungstenite::{tungstenite::Message, HyperWebsocket, WebSocketStream};
use pin_project_lite::pin_project;
use tokio::select;
use tokio_stream::StreamMap;
use tracing::{info_span, Span};
use tracing::{info_span, instrument, Span};
use turbo_tasks::{TransientInstance, TurboTasksApi};
use turbo_tasks_fs::json::parse_json_with_source_context;
use turbopack_core::{error::PrettyPrintError, issue::IssueReporterVc, version::Update};
Expand All @@ -29,7 +29,6 @@ use crate::{
pub(crate) struct UpdateServer<P: SourceProvider> {
source_provider: P,
issue_reporter: IssueReporterVc,
span: Span,
}

impl<P: SourceProvider + Clone + Send + Sync> UpdateServer<P> {
Expand All @@ -38,7 +37,6 @@ impl<P: SourceProvider + Clone + Send + Sync> UpdateServer<P> {
Self {
source_provider,
issue_reporter,
span: info_span!("UpdateServer"),
}
}

Expand All @@ -52,6 +50,7 @@ impl<P: SourceProvider + Clone + Send + Sync> UpdateServer<P> {
}));
}

#[instrument(skip_all, name = "UpdateServer::run_internal")]
async fn run_internal(self, ws: HyperWebsocket) -> Result<()> {
let mut client: UpdateClient = ws.await?.into();

Expand Down
4 changes: 2 additions & 2 deletions crates/turbopack-dev-server/src/update/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use anyhow::Result;
use futures::{prelude::*, Stream};
use tokio::sync::mpsc::Sender;
use tokio_stream::wrappers::ReceiverStream;
use tracing::{info_span, Instrument, Span};
use tracing::{info_span, Instrument};
use turbo_tasks::{
primitives::StringVc, CollectiblesSource, IntoTraitRef, State, TraitRef, TransientInstance,
};
Expand Down Expand Up @@ -212,7 +212,7 @@ pub(super) struct UpdateStream(
);

impl UpdateStream {
#[tracing::instrument(skip(get_content))]
#[tracing::instrument(skip(get_content), name = "UpdateStream::new")]
pub async fn new(
resource: String,
get_content: TransientInstance<GetContentFn>,
Expand Down

0 comments on commit 8a42066

Please sign in to comment.