We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad8d00c commit 966476bCopy full SHA for 966476b
clippy_lints/src/pathbuf_init_then_push.rs
@@ -59,7 +59,8 @@ struct PathbufPushSearcher<'tcx> {
59
}
60
61
impl<'tcx> PathbufPushSearcher<'tcx> {
62
- // try to generate `PathBuf::from`
+ /// Try to generate a suggestion with `PathBuf::from`.
63
+ /// Returns `None` if the suggestion would be invalid.
64
fn gen_pathbuf_from(&self, cx: &LateContext<'_>) -> Option<String> {
65
if let ExprKind::Call(iter_expr, []) = &self.init_val.kind
66
&& let ExprKind::Path(QPath::TypeRelative(ty, segment)) = &iter_expr.kind
0 commit comments