Skip to content

Commit d4ac870

Browse files
author
=
committed
Elide lifetimes in Utf16Writer methods
1 parent 162239d commit d4ac870

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ctru-rs/src/applets/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl PopUp {
7474
/// # }
7575
/// ```
7676
#[doc(alias = "errorText")]
77-
pub fn writer<'a>(&'a mut self) -> Utf16Writer<'a> {
77+
pub fn writer(&mut self) -> Utf16Writer<'_> {
7878
Utf16Writer::new(&mut self.state.Text)
7979
}
8080

ctru-rs/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ pub struct Utf16Writer<'a> {
9494
index: usize,
9595
}
9696

97-
impl<'a> Utf16Writer<'a> {
97+
impl Utf16Writer<'_> {
9898
/// Creates a new [Utf16Writer] that writes its output into the provided buffer.
99-
pub fn new(buf: &'a mut [u16]) -> Self {
100-
Self { buf, index: 0 }
99+
pub fn new(buf: &mut [u16]) -> Utf16Writer<'_> {
100+
Utf16Writer { buf, index: 0 }
101101
}
102102
}
103103

0 commit comments

Comments
 (0)