From d3048421706ec56cf6392ae0692cccc2890af4c6 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Mon, 21 Oct 2024 15:14:16 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Kate --- src/client/opamAdminCommand.ml | 4 ++-- src/client/opamAdminRepoUpgrade.ml | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/client/opamAdminCommand.ml b/src/client/opamAdminCommand.ml index a43b91e29b3..4e151162dd5 100644 --- a/src/client/opamAdminCommand.ml +++ b/src/client/opamAdminCommand.ml @@ -336,8 +336,8 @@ let check_opam_file_version_url has_error repo_root prefix nv opam = let min_opam_version = OpamVersion.of_string "2.0" in let url_file = let ( // ) = OpamFilename.Op.( // ) in - OpamFile.(make - (OpamRepositoryPath.packages repo_root prefix nv // "url")) + OpamFile.make + (OpamRepositoryPath.packages repo_root prefix nv // "url") in if OpamFile.exists url_file then (OpamConsole.warning "Not updating external URL file at %s" diff --git a/src/client/opamAdminRepoUpgrade.ml b/src/client/opamAdminRepoUpgrade.ml index 14c3ae43b2b..a89930992e7 100644 --- a/src/client/opamAdminRepoUpgrade.ml +++ b/src/client/opamAdminRepoUpgrade.ml @@ -430,10 +430,9 @@ let do_upgrade repo_root = (OpamFile.OPAM.write_with_preserved_format opam_file opam; let ( // ) = OpamFilename.Op.( // ) in List.iter OpamFilename.remove [ - OpamFile.(filename (make - (OpamRepositoryPath.packages repo_root prefix package // "descr"))); - OpamFile.(filename (make - (OpamRepositoryPath.packages repo_root prefix package // "url"))); + let path = OpamRepositoryPath.packages repo_root prefix package in + OpamFile.filename (OpamFile.make (path // "descr")); + OpamFile.filename (OpamFile.make (path // "url")); ]; OpamConsole.status_line "Updated %s" (OpamFile.to_string opam_file)) )