Due to bug rust-lang/rust#96634, these generic bounds may cause an infinite recursion in the compiler, even in unrelated code.
This specializes the Write for &NamedTempFile<F> impl on File instead. This keeps the API the same as before the generic parameter F was added in #177, so it shouldn't break any code. If/when the compiler bug is fixed, we can switch it back to the more generic version. Very few types implement Write for &T, however. The only other one I know of is UnixStream, which probably wouldn't be used with NamedTempFile anyway (it's counterpart UnixListener is used instead).
Due to bug rust-lang/rust#96634, these generic bounds may cause an infinite recursion in the compiler, even in unrelated code.
This specializes the
Write for &NamedTempFile<F>
impl onFile
instead. This keeps the API the same as before the generic parameterF
was added in #177, so it shouldn't break any code. If/when the compiler bug is fixed, we can switch it back to the more generic version. Very few types implementWrite for &T
, however. The only other one I know of isUnixStream
, which probably wouldn't be used withNamedTempFile
anyway (it's counterpartUnixListener
is used instead).Fixes #224.