More spans

This commit is contained in:
Igor Katson 2024-08-18 16:20:26 +01:00
parent 3f1ad390be
commit 18624d5bd8
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
2 changed files with 4 additions and 2 deletions

View file

@ -73,6 +73,7 @@ async fn test_e2e_download() {
enable_upnp_port_forwarding: false,
default_storage_factory: None,
defer_writes_up_to: None,
root_span: Some(error_span!(parent: None, "server", id = i)),
..Default::default()
},
)
@ -121,7 +122,7 @@ async fn test_e2e_download() {
session.tcp_listen_port().unwrap(),
))
}
.instrument(error_span!("server", server = i)),
.instrument(error_span!("server", id = i)),
);
futs.push(timeout(Duration::from_secs(30), rx));
}
@ -152,6 +153,7 @@ async fn test_e2e_download() {
persistence: None,
listen_port_range: None,
enable_upnp_port_forwarding: false,
root_span: Some(error_span!("client")),
..Default::default()
},
)

View file

@ -52,7 +52,7 @@ where
ByteBuf: Eq + std::hash::Hash + std::borrow::Borrow<[u8]>,
{
fn get_msgid(&self, msg_type: &'a [u8]) -> Option<u8> {
self.m.get(msg_type).map(|v| *v)
self.m.get(msg_type).copied()
}
pub fn ut_metadata(&self) -> Option<u8> {