Page MenuHomePhabricator

[identity] Remove deprecated conversion traits
ClosedPublic

Authored by bartek on Jan 22 2024, 3:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 12:25 AM
Unknown Object (File)
Oct 18 2024, 3:42 AM
Unknown Object (File)
Oct 18 2024, 3:42 AM
Unknown Object (File)
Oct 18 2024, 3:42 AM
Unknown Object (File)
Oct 18 2024, 3:42 AM
Unknown Object (File)
Sep 23 2024, 9:41 AM
Unknown Object (File)
Sep 6 2024, 8:55 PM
Unknown Object (File)
Aug 19 2024, 1:42 AM
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
No Lint Coverage
Unit
No Test Coverage

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

Clippy fix, same as D10257

shared/comm-lib/src/database.rs
173–180

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

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