Remove unneeded .as_bytes() (#15196)

`&str` already implements `AsRef<[u8]>`

changelog: none
This commit is contained in:
dswij 2025-07-03 15:51:56 +00:00 committed by GitHub
commit b631cef729
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -223,7 +223,7 @@ fn fmt_conf(check: bool) -> Result<(), Error> {
if check {
return Err(Error::CheckFailed);
}
fs::write(path, new_text.as_bytes())?;
fs::write(path, new_text)?;
}
Ok(())
}