Skip to content

Commit f457047

Browse files
committed
add helper API for obtaining PackageAtRef symbol from RefState
1 parent decd3a8 commit f457047

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/UnidocQueries/Versions/Unidoc.RefState.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import BSON
22
import MongoQL
3+
import Symbols
34
import UnidocDB
45
import UnidocRecords
56

@@ -33,6 +34,14 @@ extension Unidoc
3334
}
3435
}
3536
}
37+
extension Unidoc.RefState
38+
{
39+
@inlinable public
40+
var symbol:Symbol.PackageAtRef
41+
{
42+
.init(package: self.package.symbol, ref: self.version.edition.name)
43+
}
44+
}
3645
extension Unidoc.RefState:Mongo.MasterCodingModel
3746
{
3847
@frozen public

0 commit comments

Comments
 (0)