Skip to content

Commit 3e754ce

Browse files
Daniel Rainerwaywardmonkeys
authored andcommitted
chore: Fix mismatched_lifetime_syntaxes lint
1 parent 55c21ab commit 3e754ce

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

fluent-bundle/benches/resolver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn get_ids(res: &FluentResource) -> Vec<String> {
3737
.collect()
3838
}
3939

40-
fn get_args(name: &str) -> Option<FluentArgs> {
40+
fn get_args(name: &str) -> Option<FluentArgs<'_>> {
4141
match name {
4242
"preferences" => {
4343
let mut prefs_args = FluentArgs::new();

fluent-bundle/benches/resolver_iai.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn add_functions<R>(name: &'static str, bundle: &mut FluentBundle<R>) {
1212
}
1313
}
1414

15-
fn get_args(name: &str) -> Option<FluentArgs> {
15+
fn get_args(name: &str) -> Option<FluentArgs<'_>> {
1616
match name {
1717
"preferences" => {
1818
let mut prefs_args = FluentArgs::new();

fluent-bundle/src/args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl<'args> FluentArgs<'args> {
9393
}
9494

9595
/// Iterate over a tuple of the key an [`FluentValue`].
96-
pub fn iter(&self) -> impl Iterator<Item = (&str, &FluentValue)> {
96+
pub fn iter(&self) -> impl Iterator<Item = (&str, &FluentValue<'_>)> {
9797
self.0.iter().map(|(k, v)| (k.as_ref(), v))
9898
}
9999
}

fluent-bundle/tests/resolver_fixtures.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use unic_langid::LanguageIdentifier;
1616

1717
use helpers::*;
1818

19-
fn transform_example(s: &str) -> Cow<str> {
19+
fn transform_example(s: &str) -> Cow<'_, str> {
2020
s.replace('a', "A").into()
2121
}
2222

fluent-pseudo/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static FLIPPED_CAPS_MAP: &[char] = &[
2424
static RE_EXCLUDED: Lazy<Regex> = Lazy::new(|| Regex::new(r"&[#\w]+;|<\s*.+?\s*>").unwrap());
2525
static RE_AZ: Lazy<Regex> = Lazy::new(|| Regex::new(r"[a-zA-Z]").unwrap());
2626

27-
pub fn transform_dom(s: &str, flipped: bool, elongate: bool, with_markers: bool) -> Cow<str> {
27+
pub fn transform_dom(s: &str, flipped: bool, elongate: bool, with_markers: bool) -> Cow<'_, str> {
2828
// Exclude access-keys and other single-char messages
2929
if s.len() == 1 {
3030
return s.into();
@@ -62,7 +62,7 @@ pub fn transform_dom(s: &str, flipped: bool, elongate: bool, with_markers: bool)
6262
result
6363
}
6464

65-
pub fn transform(s: &str, flipped: bool, elongate: bool) -> Cow<str> {
65+
pub fn transform(s: &str, flipped: bool, elongate: bool) -> Cow<'_, str> {
6666
let (small_map, caps_map) = if flipped {
6767
(FLIPPED_SMALL_MAP, FLIPPED_CAPS_MAP)
6868
} else {

fluent-syntax/src/unicode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ where
133133
/// "Foo 😊 Bar"
134134
/// );
135135
/// ```
136-
pub fn unescape_unicode_to_string(input: &str) -> Cow<str> {
136+
pub fn unescape_unicode_to_string(input: &str) -> Cow<'_, str> {
137137
let mut result = String::new();
138138
let owned = unescape(&mut result, input).expect("String write methods don't Err");
139139
if owned {

0 commit comments

Comments
 (0)