Skip to content

Commit 7f0afbd

Browse files
committed
remove redundant Util.Url.make
1 parent 7c10005 commit 7f0afbd

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

src/common/Util.res

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,6 @@ module Json = {
5959
}
6060

6161
module Url = {
62-
type t = {
63-
hash: string,
64-
host: string,
65-
hostname: string,
66-
href: string,
67-
origin: string,
68-
pathname: string,
69-
}
7062
let isAbsolute: string => bool = %raw(`
7163
function(str) {
7264
var r = new RegExp('^(?:[a-z]+:)?//', 'i');
@@ -77,7 +69,6 @@ module Url = {
7769
return false;
7870
}
7971
`) //', 'i');
80-
@new external make: string => t = "URL"
8172
}
8273

8374
module Date = {

src/common/Util.resi

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
module Url: {
2-
type t = {
3-
hash: string,
4-
host: string,
5-
hostname: string,
6-
href: string,
7-
origin: string,
8-
pathname: string,
9-
}
102
let isAbsolute: string => bool
11-
let make: string => t
123
}
134

145
module Unsafe: {

src/components/Search.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ let transformItems = (items: DocSearch.transformItems) => {
6868

6969
items->Belt.Array.keepMap(item => {
7070
// Transform absolute URL into relative
71-
let url = try Util.Url.make(item.url)->Some catch {
71+
let url = try Webapi.URL.make(item.url)->Some catch {
7272
| Js.Exn.Error(obj) =>
7373
Js.Console.error2(`Failed to parse URL ${item.url}`, obj)
7474
None

0 commit comments

Comments
 (0)