Skip to content

Commit b486867

Browse files
authored
chore: fix Rust 1.84.0 lints and errors (tokio-rs#3202)
There was only a single case of the new `needless_as_bytes` lint which was triggered and needed to be fixed. There was also a "UI" test in `tracing-attributes` that needed to be updated because the error text has changed (it gives more details of course).
1 parent b02a700 commit b486867

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tracing-attributes/tests/ui/async_instrument.stderr

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
2828
--> tests/ui/async_instrument.rs:14:1
2929
|
3030
14 | #[tracing::instrument]
31-
| ^^^^^^^^^^^^^^^^^^^^^^ `(&str,)` cannot be formatted with the default formatter
31+
| ^^^^^^^^^^^^^^^^^^^^^^
32+
| |
33+
| `(&str,)` cannot be formatted with the default formatter
34+
| return type was inferred to be `(&str,)` here
3235
|
3336
= help: the trait `std::fmt::Display` is not implemented for `(&str,)`
3437
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead

tracing-subscriber/src/fmt/writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ impl io::Write for WriteAdaptor<'_> {
11131113
.write_str(s)
11141114
.map_err(|e| io::Error::new(io::ErrorKind::Other, e))?;
11151115

1116-
Ok(s.as_bytes().len())
1116+
Ok(s.len())
11171117
}
11181118

11191119
fn flush(&mut self) -> io::Result<()> {

0 commit comments

Comments
 (0)