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

Change return type for time function #47

Merged
merged 1 commit into from
May 3, 2023
Merged

Change return type for time function #47

merged 1 commit into from
May 3, 2023

Conversation

cottinisimone
Copy link
Contributor

Hello @mcasper,

Sorry, i realize that the implementation i did was not so correct. The problem is that we don't want the "domain" function to not return in case the lib had communication problems with datadog. If there's an error the result should be returned anyway. Wdyt?

The alternatives for the return type are:

  • return an object like TimeResult with inner fields result: T and error: Option<Error>
  • return a tuple (T, Option<Error>)

Thank you in advance and sorry for the inconvenience.

@cottinisimone
Copy link
Contributor Author

Ehi @mcasper wdyt about this?

@mcasper
Copy link
Owner

mcasper commented May 3, 2023

Looks great, thank you!

@mcasper mcasper merged commit 49d0ff0 into mcasper:master May 3, 2023
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.

2 participants