Skip to content

Commit

Permalink
subscriber: move fmt::LayerBuilder methods to fmt::Layer (#655)
Browse files Browse the repository at this point in the history
## Motivation

There isn't an actual reason that `fmt::Layer` needs a separate builder
type, since the builder and layer structs are identical and only differ
in what methods they provide. If the methods for configuring a `Layer`
were exposed by the `Layer` type instead, it would be simple to
construct `Layer`s — no need to call `.finish()` on the builder.

## Solution

This commit moves all the `LayerBuilder` methods to `Layer`, makes
`LayerBuilder` a type alias for `Layer`, and deprecates
`Layer::builder`, the `LayerBuilder` type, and `LayerBuilder::finish()`.
Since nothing has been removed, this shouldn't be a breaking change, but
we can remove the deprecated APIs in 0.3.x.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
hawkw authored Apr 2, 2020
1 parent 2a55831 commit 887f791
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 105 deletions.
Loading

0 comments on commit 887f791

Please sign in to comment.