Skip to content

Commit ae55b4b

Browse files
committed
remove useless atomic to executor variable
Use Rc instead of Arc. With LocalExecutor, no need of Sync & Send trait
1 parent 0c52886 commit ae55b4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

puffin_http/src/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl Server {
6262
rx: flume::Receiver<Arc<puffin::FrameData>>,
6363
num_clients: Arc<AtomicUsize>,
6464
) -> anyhow::Result<()> {
65-
let executor = Arc::new(LocalExecutor::new());
65+
let executor = Rc::new(LocalExecutor::new());
6666

6767
let clients = Rc::new(RefCell::new(Vec::new()));
6868
let clients_cloned = clients.clone();
@@ -150,7 +150,7 @@ impl Drop for Client {
150150

151151
/// Listens for incoming connections
152152
struct PuffinServerConnection<'a> {
153-
executor: Arc<LocalExecutor<'a>>,
153+
executor: Rc<LocalExecutor<'a>>,
154154
tcp_listener: TcpListener,
155155
clients: Rc<RefCell<Vec<Client>>>,
156156
num_clients: Arc<AtomicUsize>,

0 commit comments

Comments
 (0)