Skip to content

Commit bc92479

Browse files
committed
chore: Refactor get function return type
1 parent 777f2e7 commit bc92479

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

macros/src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,8 @@ fn get_function_return_type(output: &ReturnType) -> FunctionReturnType {
163163
.last()
164164
.map(|segment| segment.ident.to_string());
165165
if let Some(s) = type_str {
166-
if s == "Result" {
167-
is_result = true;
168-
} else if s == "Option" {
169-
is_option = true
170-
}
166+
is_option = s == "Option";
167+
is_result = s == "Result";
171168
}
172169
}
173170
FunctionReturnType {

0 commit comments

Comments
 (0)