You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please consider automatically converting Strings to string slices when a string is passed into a string slice context. Please pardon my total lack of experience with rust but I think this shouldn't introduce any bugs in the program since a string slice is a more restricted type than a String. Any thoughts?
Example:
fn takes_slice(slice: &str) {
println!("Got: {}", slice);
}
fn main() {
let s = "Hello".to_string();
takes_slice(s);
}
instead of ...
fn main() {
let s = "Hello".to_string();
takes_slice(s.as_slice());
}
May be we can provide a conversion operator like C++ does?
The text was updated successfully, but these errors were encountered:
fix diagnostics clearing when flychecks run per-workspace
This might be causing rust-lang#17300 or it's a different bug with the same functionality.
I wonder if the decision to clear diagnostics should stay in the main loop or maybe the flycheck itself should track it and tell the mainloop?
I have used a hash map but we could just as well use a vector since the IDs are `usizes` in some given range starting at 0. It would be probably faster but this just felt a bit cleaner and it allows us to change the ID to newtype later and we can just use a hasher that returns the underlying integer.
Please consider automatically converting Strings to string slices when a string is passed into a string slice context. Please pardon my total lack of experience with rust but I think this shouldn't introduce any bugs in the program since a string slice is a more restricted type than a String. Any thoughts?
Example:
instead of ...
May be we can provide a conversion operator like C++ does?
The text was updated successfully, but these errors were encountered: