Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Clippy error: mut required for push_str
fn push_fn_err(s :&str)->String{
s.to_string().push_str("new_chunk");
s.to_string()
}
fn push_str_expect(s:&str)->String{
let mut output = s.to_string();
output.push_str("new_chunk");
output.to_string()
}
fn main() {
assert_eq!(push_fn_err(""),push_str_expect("")) ;
}
3 posts - 2 participants
🏷️ Rust_feed