From 6a9df6ea062b5102390da0c2978146dfdbbae7e4 Mon Sep 17 00:00:00 2001 From: koe Date: Sun, 8 Sep 2024 22:57:11 -0500 Subject: [PATCH] make ReplicatedClients::new public --- CHANGELOG.md | 4 ++++ src/core/replicated_clients.rs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5d31f64..965c97cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Made `ReplicatedClients::new` public for use in testing contexts. + ## [0.28.1] - 2024-09-04 ### Fixed diff --git a/src/core/replicated_clients.rs b/src/core/replicated_clients.rs index a926e670..f9addca8 100644 --- a/src/core/replicated_clients.rs +++ b/src/core/replicated_clients.rs @@ -25,7 +25,10 @@ pub struct ReplicatedClients { } impl ReplicatedClients { - pub(crate) fn new(policy: VisibilityPolicy, replicate_after_connect: bool) -> Self { + /// Makes a new replicated clients struct. + /// + /// Generally you should not need this except in testing contexts. + pub fn new(policy: VisibilityPolicy, replicate_after_connect: bool) -> Self { Self { clients: Default::default(), policy,