Skip to content

Commit 8126a13

Browse files
committed
remove duplicated function
1 parent e896491 commit 8126a13

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed
File renamed without changes.

jscomp/syntax/src/react_jsx_common.ml

-10
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,6 @@ let removeArity binding =
6464
in
6565
{binding with pvb_expr = removeArityRecord binding.pvb_expr}
6666

67-
let add_async_attribute ~async (body : Parsetree.expression) =
68-
if async then
69-
{
70-
body with
71-
pexp_attributes =
72-
({txt = "res.async"; loc = Location.none}, PStr [])
73-
:: body.pexp_attributes;
74-
}
75-
else body
76-
7767
let is_async : Parsetree.attribute -> bool =
7868
fun ({txt}, _) -> txt = "async" || txt = "res.async"
7969

jscomp/syntax/src/reactjs_jsx_v4.ml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1091,9 +1091,7 @@ let mapBinding ~config ~emptyLoc ~pstr_loc ~fileName ~recFlag binding =
10911091
| _ -> [Typ.any ()]))))
10921092
expression
10931093
in
1094-
let expression =
1095-
React_jsx_common.add_async_attribute ~async:isAsync expression
1096-
in
1094+
let expression = Ast_async.add_async_attribute ~async:isAsync expression in
10971095
let expression =
10981096
(* Add new tupes (type a,b,c) to make's definition *)
10991097
newtypes

0 commit comments

Comments
 (0)