6e76601529
Pty::path is a manual implementation of write! that also allocates. Using write! avoids the alloc and is simpler too. The original function didn't return an error even if called with a small buffer and this version preserves that.