Skip to content

Conversation

@oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Nov 13, 2014

creating a new Id object requires the format to match a subset of ID format defined by the DOT language. When the format did not match, the function called assert. This was not mentioned in the docs or the spec. I made the failure explicit by returning an Result<Id, ()>.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon.

@oli-obk
Copy link
Contributor Author

oli-obk commented Nov 13, 2014

sorry, didn't know about make tidy, will fix in a sec... https://github.com/rust-lang/rust/wiki/Note-development-policy#pull-request-procedure should probably be extended to include make tidy

@oli-obk oli-obk force-pushed the refactoring/graphviz/id/new/result_instead_of_fail branch from 0798273 to f4ba7ee Compare November 13, 2014 13:39
Copy link
Member

Choose a reason for hiding this comment

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

Could you update the documentation of this function to include the error cases as well? It's not totally clear when Err would be returned for example.

@oli-obk oli-obk force-pushed the refactoring/graphviz/id/new/result_instead_of_fail branch from f4ba7ee to 6221f7e Compare November 14, 2014 09:47
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexcrichton like this or should i create an example?

Copy link
Member

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@oli-obk oli-obk force-pushed the refactoring/graphviz/id/new/result_instead_of_fail branch from 6221f7e to d0edf59 Compare November 14, 2014 11:47
@oli-obk oli-obk force-pushed the refactoring/graphviz/id/new/result_instead_of_fail branch 5 times, most recently from abbc1cc to 9c06cb7 Compare November 17, 2014 13:54
…rror

creating a new Id object requires the format to match a subset of `ID` format defined by the DOT language. When the format did not match, the function called assert. This was not mentioned in the docs or the spec. I made the failure explicit by returning an Result<Id, ()>.
@oli-obk oli-obk force-pushed the refactoring/graphviz/id/new/result_instead_of_fail branch from 9c06cb7 to 70bf4f7 Compare November 17, 2014 14:08
@oli-obk
Copy link
Contributor Author

oli-obk commented Nov 17, 2014

the tests are now two separate tests (and they compile).
I think i got all avenues covered this time around.
please run the merge again @alexcrichton

@alexcrichton
Copy link
Member

Thanks @oli-obk!

@bors bors merged commit 70bf4f7 into rust-lang:master Nov 18, 2014
@oli-obk oli-obk deleted the refactoring/graphviz/id/new/result_instead_of_fail branch November 18, 2014 12:58
lnicola pushed a commit to lnicola/rust that referenced this pull request Jan 20, 2025
internal: Compute inlay hint text edits lazily
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.

5 participants