Skip to content

Commit dcfddd7

Browse files
committed
test: prove lifetime decoupling
1 parent 41a0dfb commit dcfddd7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/shorthands/simple_curly_braces.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ mod std_tests {
113113

114114
#[test]
115115
fn using_type_aliases() {
116-
fn _type_check() {
116+
fn _type_check(short_lived_response: &str) {
117117
#[derive(Debug, Display, Error, Clone, Copy)]
118118
enum QueryError {}
119119

120120
let system: SimpleCurlyBraces = simple_curly_braces();
121121

122122
let lazy_parsed_template: LazilyParsed<'_, _> = system.lazy_parse("");
123123
let lazy_result: Result<String, LazilyParsedApplicationError<QueryError>> =
124-
lazy_parsed_template.to_string(|_| Ok::<_, QueryError>(""));
124+
lazy_parsed_template.to_string(|_| Ok::<_, QueryError>(short_lived_response));
125125
drop(lazy_result);
126126

127127
let eager_parsed_template: Result<
@@ -131,7 +131,7 @@ mod std_tests {
131131
let eager_parsed_template: EagerlyParsedTemplate<_, &str> =
132132
eager_parsed_template.as_ref().unwrap().to_template();
133133
let eager_result: Result<String, EagerlyParsedApplicationError<QueryError>> =
134-
eager_parsed_template.to_string(|_| Ok::<_, QueryError>(""));
134+
eager_parsed_template.to_string(|_| Ok::<_, QueryError>(short_lived_response));
135135
drop(eager_result);
136136
}
137137
}

0 commit comments

Comments
 (0)