-
Notifications
You must be signed in to change notification settings - Fork 26
Conversation
@@ -446,7 +446,7 @@ impl<L: AnalysisLoader> AnalysisHost<L> { | |||
}) | |||
} | |||
|
|||
// e.g., https://github.com/rust-lang/rust/blob/master/src/libcollections/string.rs#L261-L263 | |||
// e.g., https://github.com/rust-lang/rust/blob/master/src/liballoc/string.rs#L261-L263 |
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.
Changed, since the previous link was invalid
}, | ||
// A crate we've never seen before. | ||
None => { | ||
// We have fresher data than what we can read. |
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.
Wanted to get rid of defining the same block twice for two cases, is this okay?
let mut buf = String::new(); | ||
file.read_to_string(&mut buf).unwrap(); | ||
|
||
let buf = read_file_contents(path).or_else(|err| { |
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.
Separated into read_file_contents
to catch a possible error and report it, however if we were to ignore warning about the error, this could be further simplified with ok()?
s - should I change that?
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.
Nah, seems good to acknowledge the error
@@ -6,21 +6,17 @@ | |||
// option. This file may not be copied, modified, or distributed | |||
// except according to those terms. | |||
|
|||
macro_rules! option_try( |
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.
impl Try for Option has landed! 🎉
Thanks! |
No description provided.