Skip to content

Commit f690c31

Browse files
committed
fix: update lookup signature to return owned Client instead of reference
1 parent ecc63ee commit f690c31

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

moq-relay-ietf/src/bin/moq-relay-ietf/file_coordinator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ impl Coordinator for FileCoordinator {
179179
Ok(())
180180
}
181181

182-
async fn lookup<'a>(
182+
async fn lookup(
183183
&self,
184184
namespace: &TrackNamespace,
185-
) -> CoordinatorResult<(NamespaceOrigin, Option<&'a Client>)> {
185+
) -> CoordinatorResult<(NamespaceOrigin, Option<Client>)> {
186186
let namespace = namespace.clone();
187187
let file_path = self.file_path.clone();
188188

189189
let result = tokio::task::spawn_blocking(
190-
move || -> Result<Option<(NamespaceOrigin, Option<&Client>)>> {
190+
move || -> Result<Option<(NamespaceOrigin, Option<Client>)>> {
191191
let file = OpenOptions::new()
192192
.read(true)
193193
.write(true)

moq-relay-ietf/src/coordinator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ pub trait Coordinator: Send + Sync {
171171
///
172172
/// - `Ok(NamespaceOrigin, Option<quic::Client>)` - Namespace origin and optional client if available
173173
/// - `Err` - Namespace not found anywhere
174-
async fn lookup<'a>(
174+
async fn lookup(
175175
&self,
176176
namespace: &TrackNamespace,
177-
) -> CoordinatorResult<(NamespaceOrigin, Option<&'a quic::Client>)>;
177+
) -> CoordinatorResult<(NamespaceOrigin, Option<quic::Client>)>;
178178

179179
/// Graceful shutdown of the coordinator.
180180
///

moq-relay-ietf/src/remote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl RemoteManager {
5656
let url = origin.url();
5757

5858
// Get or create a connection to the remote relay
59-
let remote = self.get_or_connect(&url, client).await?;
59+
let remote = self.get_or_connect(&url, client.as_ref()).await?;
6060

6161
// Subscribe to the track on the remote
6262
remote.subscribe(namespace, track_name).await

0 commit comments

Comments
 (0)