TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Rust Is Looking for Your Feedback to Help Guide Its Future

7 点作者 LinuxBender大约 1 个月前

1 comment

eYrKEC2大约 1 个月前
Ooo. I want to be able to do an expression in a format string.<p>Instead of:<p>format!(&quot;{}:{} wasn&#x27;t able to connect to host {}.&quot;, file!(), line!(), db_opts.hostname);<p>I&#x27;d rather do:<p>format!(&quot;{file!()}:{line!()} wasn&#x27;t able to connect to host {db_opts.hostname}.&quot;);<p>Yes, expressions in format strings can be abused, but knee-capping a pretty standard case (`instance.field`)to prevent outlier bad behavior seems like a premature optimization.