Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

fix: don't check storage for new uaid's #1020

Merged
merged 1 commit into from
Sep 13, 2017
Merged

fix: don't check storage for new uaid's #1020

merged 1 commit into from
Sep 13, 2017

Conversation

bbangert
Copy link
Member

Closes #1017

@codecov-io
Copy link

codecov-io commented Sep 13, 2017

Codecov Report

Merging #1020 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1020   +/-   ##
=======================================
  Coverage   99.78%   99.78%           
=======================================
  Files          57       57           
  Lines        9598     9598           
=======================================
  Hits         9577     9577           
  Misses         21       21

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82a81a9...922e342. Read the comment docs.

@@ -359,8 +361,9 @@ def lookup_user(self, hello):
# type: (Hello) -> (Optional[JSONDict], JSONDict)
flags = dict(
message_month=None,
rotate_message_table=False,
check_storage=False,
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we not change the order of these? It's not like they're in alphabetical order anyway, and it's generally better to put new items at the end of lists to avoid accidental flag set.

Copy link
Member Author

Choose a reason for hiding this comment

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

When creating a dict? I understand it in keyword args to API methods to add it to the end, but this just makes a dict.

Copy link
Member

Choose a reason for hiding this comment

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

fair, but since we do specify a set of args that match these, I thought it might be nice for consistency.

=> self.data.process_hello(uaid, message_month, reset_uaid, rotate_message_table),
_ => return Err("Already connected elsewhere".into()),
call::HelloResponse { uaid: Some(uaid), message_month, check_storage, reset_uaid, rotate_message_table }
=> self.data.process_hello(uaid, message_month, check_storage, reset_uaid, rotate_message_table),
Copy link
Member

Choose a reason for hiding this comment

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

nit: this seems hard to read quickly. Should there be an indent here to designate that call::HelloResponse is the match?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have an upcoming PR that will run rustfmt over all of it, which will reformat this. I didn't want to fold that into this as there's lots of little tweaks in it.

@@ -435,9 +435,10 @@ where
Ok(Async::Ready(item))
}

fn process_hello(&mut self, uaid: Uuid, message_month: String, reset_uaid: bool, rotate_message_table: bool) -> ClientState {
fn process_hello(&mut self, uaid: Uuid, message_month: String, check_storage: bool, reset_uaid: bool, rotate_message_table: bool) -> ClientState {
Copy link
Member

Choose a reason for hiding this comment

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

nit: Again, I'd be happier if the new arg was at the end of this list.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yes, here it matters! Changing.

@bbangert bbangert merged commit 620d7ad into master Sep 13, 2017
@bbangert bbangert deleted the feat/issue-1017 branch September 13, 2017 22:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants