-
Notifications
You must be signed in to change notification settings - Fork 88
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
Update dfinity #315
Update dfinity #315
Conversation
impl str::FromStr for CanisterId { | ||
type Err = num::ParseIntError; | ||
|
||
fn from_str(s: &str) -> Result<Self, Self::Err> { | ||
Ok(CanisterId::from_u64(u64::from_str(s)?)) | ||
Ok(CanisterId(Blob(s.to_string().into_bytes()))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not in this PR, but what is the semantics of from_str
? A str
is text, never binary data (“String slices are always valid UTF-8.” according to the docs), so I guess this trait should either decode the the textual representation, or maybe simply not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good point and I was planning to fix it actually here, after other fires in this PR get resolved. I will continue working on this today most likely. If it ends up being to much work I will file it as a high priority bug (due to how hard it will be to debug) and defer for follow up.
Could I need this to get |
hat trick ;) |
No description provided.