refactor: quiet latest clippy warnings

This commit is contained in:
Philip Jenvey 2023-09-25 12:24:16 -07:00
parent 95bad0ae70
commit dc98e95ff3
No known key found for this signature in database
GPG Key ID: 5B9F83DE4F7EB7FA
5 changed files with 9 additions and 2 deletions

View File

@ -22,7 +22,7 @@ pub fn report(
extra: HashMap<String, String>,
mut event: Event<'static>,
) {
event.tags.extend(tags.into_iter());
event.tags.extend(tags);
event
.extra
.extend(extra.into_iter().map(|(k, v)| (k, Value::from(v))));

View File

@ -866,7 +866,7 @@ async fn get_bsos() -> Result<(), DbError> {
let uid = 2;
let coll = "clients";
let sortindexes = vec![1, 3, 4, 2, 0];
let sortindexes = [1, 3, 4, 2, 0];
for (i, (revi, sortindex)) in sortindexes.iter().enumerate().rev().enumerate() {
let bso = pbso(
uid,

View File

@ -130,6 +130,8 @@ impl MysqlDb {
conn: LoggingConnection::new(conn),
session: RefCell::new(Default::default()),
};
// https://github.com/mozilla-services/syncstorage-rs/issues/1480
#[allow(clippy::arc_with_non_send_sync)]
MysqlDb {
inner: Arc::new(inner),
coll_cache,

View File

@ -113,6 +113,9 @@ impl SpannerDb {
session: RefCell::new(Default::default()),
};
SpannerDb {
// We can probably move this to Rc:
// https://github.com/mozilla-services/syncstorage-rs/issues/1480
#[allow(clippy::arc_with_non_send_sync)]
inner: Arc::new(inner),
coll_cache,
metrics: metrics.clone(),

View File

@ -76,6 +76,8 @@ impl TokenserverDb {
conn: LoggingConnection::new(conn),
};
// https://github.com/mozilla-services/syncstorage-rs/issues/1480
#[allow(clippy::arc_with_non_send_sync)]
Self {
inner: Arc::new(inner),
metrics: metrics.clone(),