Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone committed Nov 22, 2024
1 parent 5399d56 commit d29ddeb
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,7 @@ object ReadResourceV2 {
private def setCopyrightAndLicenceIfMissingResourceValues(
copyright: Option[CopyrightAttribution],
license: Option[License],
): ReadResourceV2 => ReadResourceV2 = { rr =>

): ReadResourceV2 => ReadResourceV2 = {
def readValueWith(predicate: FileValueV2 => Boolean): ReadValueV2 => Boolean = rv =>
ReadValueV2Optics.fileValueV2.getOption(rv).exists(predicate)

Expand All @@ -612,7 +611,7 @@ object ReadResourceV2 {

setIfMissing(FileValueV2Optics.licenseOption, license).andThen(
setIfMissing(FileValueV2Optics.copyrightAttributionOption, copyright),
)(rr)
)
}

private def setCopyrightAndLicenceIfMissingOnLinkedResources(
Expand Down

0 comments on commit d29ddeb

Please sign in to comment.