Skip to content

Commit aeb84f9

Browse files
committed
Remove unnecessary lifetimes
Those can be inferred by the compiler.
1 parent 78518c1 commit aeb84f9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl error::Error for Error {
4747
/// SASLprep is defined in [RFC 4013][].
4848
///
4949
/// [RFC 4013]: https://tools.ietf.org/html/rfc4013
50-
pub fn saslprep<'a>(s: &'a str) -> Result<Cow<'a, str>, Error> {
50+
pub fn saslprep(s: &str) -> Result<Cow<'_, str>, Error> {
5151
// fast path for ascii text
5252
if s.chars()
5353
.all(|c| c.is_ascii() && !tables::ascii_control_character(c)) {
@@ -127,7 +127,7 @@ fn is_prohibited_bidirectional_text(s: &str) -> bool {
127127
/// Nameprep is defined in [RFC 3491][].
128128
///
129129
/// [RFC 3491]: https://tools.ietf.org/html/rfc3491
130-
pub fn nameprep<'a>(s: &'a str) -> Result<Cow<'a, str>, Error> {
130+
pub fn nameprep(s: &str) -> Result<Cow<'_, str>, Error> {
131131
// 3. Mapping
132132
let mapped = s.chars()
133133
.filter(|&c| !tables::commonly_mapped_to_nothing(c))
@@ -175,7 +175,7 @@ pub fn nameprep<'a>(s: &'a str) -> Result<Cow<'a, str>, Error> {
175175
/// Nameprep is defined in [RFC 3920, Appendix A][].
176176
///
177177
/// [RFC 3920, Appendix A]: https://tools.ietf.org/html/rfc3920#appendix-A
178-
pub fn nodeprep<'a>(s: &'a str) -> Result<Cow<'a, str>, Error> {
178+
pub fn nodeprep(s: &str) -> Result<Cow<'_, str>, Error> {
179179
// A.3. Mapping
180180
let mapped = s.chars()
181181
.filter(|&c| !tables::commonly_mapped_to_nothing(c))
@@ -233,7 +233,7 @@ fn prohibited_node_character(c: char) -> bool {
233233
/// Nameprep is defined in [RFC 3920, Appendix B][].
234234
///
235235
/// [RFC 3920, Appendix B]: https://tools.ietf.org/html/rfc3920#appendix-B
236-
pub fn resourceprep<'a>(s: &'a str) -> Result<Cow<'a, str>, Error> {
236+
pub fn resourceprep(s: &str) -> Result<Cow<'_, str>, Error> {
237237
// B.3. Mapping
238238
let mapped = s.chars()
239239
.filter(|&c| !tables::commonly_mapped_to_nothing(c))

src/rfc3454.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// AUTOGENERATED CODE - DO NOT EDIT
22

3-
pub const A_1: &'static [(char, char)] = &[
3+
pub const A_1: &[(char, char)] = &[
44
('\u{0221}', '\u{0221}'),
55
('\u{0234}', '\u{024F}'),
66
('\u{02AE}', '\u{02AF}'),
@@ -399,7 +399,7 @@ pub const A_1: &'static [(char, char)] = &[
399399
('\u{E0080}', '\u{EFFFD}'),
400400
];
401401

402-
pub const B_2: &'static [(char, &'static str)] = &[
402+
pub const B_2: &[(char, &str)] = &[
403403
('\u{0041}', "\u{0061}"),
404404
('\u{0042}', "\u{0062}"),
405405
('\u{0043}', "\u{0063}"),

0 commit comments

Comments
 (0)