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
This will allow for better coherence. The blanket Into from std lib for coherence breaks the current attempt.
Currently something like the following has problems:
structS;implDisplayforS{fnfmt(&self,f:&mutFormatter<'_>) -> Result{write!(f, "foobar")}}fnfoo(d:implInto<Channel>){let ch = d.into();}foo("foobar");// worksfoo(S{});// does not workfoo(S{}.to_string());// works
And a bit of bikeshed. ToChannel vs AsChannel (e.g. consuming or borrowing). With the way the Writer works, it doesn't need ownership because its just going to format a string in the end, so everything can be borrowed which would be concatenated with some static data.
The text was updated successfully, but these errors were encountered:
This will allow for better coherence. The blanket Into from std lib for coherence breaks the current attempt.
Currently something like the following has problems:
And a bit of bikeshed.
ToChannel
vsAsChannel
(e.g. consuming or borrowing). With the way theWriter
works, it doesn't need ownership because its just going to format a string in the end, so everything can be borrowed which would be concatenated with some static data.The text was updated successfully, but these errors were encountered: