Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some post-landing review comments for rotating device id. #9804

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

bzbarsky-apple
Copy link
Contributor

Specific changes:

  1. Use MutableButeSpan foo(bar) instead of
    MutableByteSpan foo = MutableByteSpan(bar).

  2. Use the Put signature that takes ByteSpan when writing to the TLVWriter.

  3. Fix some comments on generateRotatingDeviceIdAsBinary to make it
    clearer how the "in,out" param works.

  4. Stop failing out for rotating device ids that are smaller than the max
    possible size. Add a test for this.

Problem

#9455 was merged before I got a chance to look at the final changes. Mostly nits, but the functional problem for "too short" rotating device ids was never fixed and the test I asked for was never added.

Change overview

Address the remaining issues.

Testing

New unit test passes.

Specific changes:

1) Use `MutableButeSpan foo(bar)` instead of
   `MutableByteSpan foo = MutableByteSpan(bar)`.

2) Use the `Put` signature that takes ByteSpan when writing to the TLVWriter.

3) Fix some comments on generateRotatingDeviceIdAsBinary to make it
   clearer how the "in,out" param works.

4) Stop failing out for rotating device ids that are smaller than the max
   possible size.  Add a test for this.
@bzbarsky-apple
Copy link
Contributor Author

@andy31415 andy31415 merged commit a8fa024 into project-chip:master Sep 20, 2021
@bzbarsky-apple bzbarsky-apple deleted the rotating-id-cleanups branch September 20, 2021 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants