diff options
Diffstat (limited to '')
| -rw-r--r-- | lib/concepts/Branch.ml | 13 | ||||
| -rw-r--r-- | lib/concepts/Branch.mli | 1 |
2 files changed, 3 insertions, 11 deletions
diff --git a/lib/concepts/Branch.ml b/lib/concepts/Branch.ml index cd4213b..57c46b3 100644 --- a/lib/concepts/Branch.ml +++ b/lib/concepts/Branch.ml @@ -1,8 +1,5 @@ type address = Hash.hash - -type t = - { name: string; - target: address } +type t = {name: string; target: address} module Field = struct let name = "name" @@ -22,7 +19,6 @@ module Error = struct end let make ~name ~target = {name; target} - let name branch = branch.name let target branch = branch.target @@ -31,13 +27,10 @@ module Body = struct let tag = 'b' let malformed = Error.malformed_branch - - let equal left right = - left.name = right.name && Hash.hash_equals left.target right.target + let equal left right = left.name = right.name && Hash.hash_equals left.target right.target let fields branch = - [ Field.name, Object.Field.string branch.name; - Field.target, Object.Field.address branch.target ] + [Field.name, Object.Field.string branch.name; Field.target, Object.Field.address branch.target] let of_fields data = let open Utilities.Result in diff --git a/lib/concepts/Branch.mli b/lib/concepts/Branch.mli index 0e7e9f9..3fb6ebe 100644 --- a/lib/concepts/Branch.mli +++ b/lib/concepts/Branch.mli @@ -4,6 +4,5 @@ type address = Hash.hash include Object.S with type t := t val make : name:string -> target:address -> t - val name : t -> string val target : t -> address |
