Skip to content

Conversation

@jrconlin
Copy link
Contributor

@jrconlin jrconlin commented Sep 8, 2020

(that fix was simple and not at all obvious)

Closes #253

(that fix was simple and not at all obvious)

Closes getsentry#253
jrconlin added a commit to mozilla-services/syncstorage-rs that referenced this pull request Sep 8, 2020
NOTE: This will disable cargo audit. Audit notes that sentry-core
includes a vul'n dependency. Audit should be re-enabled once
getsentry/sentry-rust#254 lands.
event.extra.extend(self.extra.iter().cloned());
event.tags.extend(self.tags.iter().cloned());
event.contexts.extend(self.contexts.iter().cloned());
event.breadcrumbs.extend(self.breadcrumbs.clone().into_iter());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just run rustfmt on this:

-        event.breadcrumbs.extend(self.breadcrumbs.clone().into_iter());
+        event
+            .breadcrumbs
+            .extend(self.breadcrumbs.clone().into_iter());

But can you explain why you need this? Is this an API change in im?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing. (Sorry, I always forget to fmt)

Yeah, this looks to be a change required by im.
extend() changed from accepting a reference for a tuple to a tuple of references.

error[E0271]: type mismatch resolving `<im::hashmap::Iter<'_, std::string::String, sentry_types::protocol::v7::Context> as std::iter::Iterator>::Item == &_`
   --> sentry-core/src/scope/real.rs:243:52
    |
243 |         event.contexts.extend(self.contexts.iter().cloned());
    |                                                    ^^^^^^ expected tuple, found reference
    |
    = note:  expected tuple `(&std::string::String, &sentry_types::protocol::v7::Context)`
            found reference `&_`

@Swatinem Swatinem merged commit e8ec86a into getsentry:master Sep 9, 2020
jrconlin added a commit to mozilla-services/syncstorage-rs that referenced this pull request Sep 9, 2020
NOTE: This will disable cargo audit. Audit notes that sentry-core
includes a vul'n dependency. Audit should be re-enabled once
getsentry/sentry-rust#254 lands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo audit flagging sized-chunks 0.5.3

2 participants