Releases: fossas/locator-rs
Releases · fossas/locator-rs
v2.3.0
v2.2.0
What's Changed
Replace typed_builder
with bon
by @jssblck in #9:
Instead of this:
let org_id = Some(1234);
let locator = StrictLocator::builder()
.fetcher(Fetcher::Git)
.package("...")
.revision("...");
let locator = match org_id {
None => locator.build(),
Some(org_id) => locator.org_id(org_id).build(),
};
Users can now do this:
let org_id = Some(1234);
let locator = StrictLocator::builder()
.fetcher(Fetcher::Git)
.package("...")
.revision("...")
.maybe_org_id(org_id)
.build();
Users can still fill the field directly when a value is known to exist:
let locator = StrictLocator::builder()
.fetcher(Fetcher::Git)
.package("...")
.revision("...")
.org_id(1234)
.build();
Additionally, error messages for partially built structs are now improved.
Full Changelog: v2.1.0...v2.2.0
v2.1.0
What's Changed
Update docs, add convenience implementations by @jssblck in #8
Locator
,StrictLocator
, andPackageLocator
now implementAsRef<&T>
(so you can useimpl AsRef<&Locator>
).Locator
,StrictLocator
, andPackageLocator
now implementFromStr
(so you can use"...".parse()
).- Compile-time checked macros for constructing locators are now available:
locator::strict!
constructs aStrictLocator
locator::package!
constructs aPackageLocator
locator::locator!
constructs aLocator
- Docs for the
org_id
field inLocator
,StrictLocator
, andPackageLocator
explain the intention and suggested use for the field more clearly.
Full Changelog: v2.0.2...v2.1.0