2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2025-01-08 18:51:24 +00:00
This commit is contained in:
asonix 2023-05-08 10:50:11 -05:00
parent 240e057f19
commit 7ae9a3d993
4 changed files with 7 additions and 7 deletions

View file

@ -114,7 +114,7 @@ impl Drop for CancelToken {
fn drop(&mut self) { fn drop(&mut self) {
if self.receiver.is_none() { if self.receiver.is_none() {
let completed = PROCESS_MAP.remove(&self.path).is_none(); let completed = PROCESS_MAP.remove(&self.path).is_none();
self.span.record("completed", &completed); self.span.record("completed", completed);
} }
} }
} }

View file

@ -212,8 +212,8 @@ where
if let Ok(err) = res { if let Ok(err) = res {
let display = format!("{}", err); let display = format!("{}", err);
let debug = format!("{:?}", err); let debug = format!("{:?}", err);
span.record("exception.message", &display.as_str()); span.record("exception.message", display.as_str());
span.record("exception.details", &debug.as_str()); span.record("exception.details", debug.as_str());
return Poll::Ready(Err(err)); return Poll::Ready(Err(err));
} }
} }
@ -223,8 +223,8 @@ where
if let Err(err) = &res { if let Err(err) = &res {
let display = format!("{}", err); let display = format!("{}", err);
let debug = format!("{:?}", err); let debug = format!("{:?}", err);
span.record("exception.message", &display.as_str()); span.record("exception.message", display.as_str());
span.record("exception.details", &debug.as_str()); span.record("exception.details", debug.as_str());
} }
return Poll::Ready(res); return Poll::Ready(res);
} }

View file

@ -17,7 +17,7 @@ pub(crate) fn chop_bytes(
if let Some((start, end)) = byte_range.to_satisfiable_range(length) { if let Some((start, end)) = byte_range.to_satisfiable_range(length) {
// END IS INCLUSIVE // END IS INCLUSIVE
let end = end as usize + 1; let end = end as usize + 1;
return Ok(once(ready(Ok(bytes.slice(start as usize..end as usize))))); return Ok(once(ready(Ok(bytes.slice(start as usize..end)))));
} }
Err(UploadError::Range.into()) Err(UploadError::Range.into())

View file

@ -89,7 +89,7 @@ where
debug!("Remove hash/id -> alias mapping"); debug!("Remove hash/id -> alias mapping");
let id = String::from_utf8_lossy(&id); let id = String::from_utf8_lossy(&id);
let key = alias_key(&hash, &id); let key = alias_key(&hash, &id);
let _ = manager.inner.main_tree.remove(&key); let _ = manager.inner.main_tree.remove(key);
} }
let _ = manager.check_delete_files(store, hash).await; let _ = manager.check_delete_files(store, hash).await;