Page MenuHomePhabricator

[identity] Remove deprecated conversion traits
ClosedPublic

Authored by bartek on Jan 22 2024, 3:02 AM.
Tags
None
Referenced Files
F2162572: D10762.id.diff
Mon, Jul 1, 4:33 PM
Unknown Object (File)
Wed, Jun 26, 5:37 AM
Unknown Object (File)
Tue, Jun 25, 11:49 AM
Unknown Object (File)
Tue, Jun 25, 11:49 AM
Unknown Object (File)
Tue, Jun 25, 11:49 AM
Unknown Object (File)
Tue, Jun 25, 11:49 AM
Unknown Object (File)
Mon, Jun 24, 4:34 AM
Unknown Object (File)
Tue, Jun 11, 9:36 PM
Subscribers

Details

Summary

After legacy device list code was removed, the conversion traits were no longer used. This removes them and replaces last usages with the proper calls from comm-lib. This will also simplify the social proof fix (next diffs).

I had to add implementation for optional attributes to comm-lib, since it was missing.

Depends on D10701

Test Plan
  • Identity integration tests
  • Unit tests for comm-lib to test optional attributes

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jan 22 2024, 3:44 AM
bartek added inline comments.
services/identity/src/ddb_utils.rs
76 ↗(On Diff #35917)

Clippy fix, same as D10257

shared/comm-lib/src/database.rs
173–180 ↗(On Diff #35917)

Wondering if this should be simplified this way. Currently, all implementations of TryFromAttribute return DBItemAttributeError::Missing if the attribute is None and we're already checking that above. Can we think of other situations where DBItemAttributeError::Missing can be possibly returned?

varun added inline comments.
shared/comm-lib/src/database.rs
173–180 ↗(On Diff #35917)

i can't think of another scenario where the Missing variant could be returned, but i still prefer the current syntax, even if it's more verbose

This revision is now accepted and ready to land.Jan 25 2024, 8:55 PM