Skip to content

Commit ffc1c77

Browse files
sgolluklotzde
andauthored
Use closure instead of reference to closure in run_until_cancelled() (#236)
## Description This adjusts the signature of `ServerRunner::run_until_cancelled()` to avoid an unnecessary reference. Co-authored-by: Uwe Klotz <uwe.klotz@gmail.com>
1 parent ecdf84e commit ffc1c77

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
2424
- Breaking: Remove methods `ua::DataValue::status_code()` and `ua::DataValue::with_status_code()`
2525
deprecated in 0.7.1. Use `status()` and/or `with_status()` instead.
2626
- Breaking: Remove method `ua::String::as_slice()` deprecated in 0.5.0. Use `as_bytes()` instead.
27+
- Breaking: Adjust signature of `ServerRunner::run_until_cancelled()` to use closure instead of a
28+
reference to a closure.
2729
- Breaking: Bump Minimum Supported Rust Version (MSRV) to 1.83.
2830
- Rename `ServerRunner::run()` to `ServerRunner::run_until_interrupt()`. Deprecate former method.
2931
- Mark `AsyncMonitoredItem::into_stream()` as deprecated. Use the `Stream` implementation of this

src/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ impl ServerRunner {
15461546
/// # Errors
15471547
///
15481548
/// This fails when the server cannot be started.
1549-
pub fn run_until_cancelled(self, is_cancelled: &mut impl FnMut() -> bool) -> Result<()> {
1549+
pub fn run_until_cancelled(self, mut is_cancelled: impl FnMut() -> bool) -> Result<()> {
15501550
let Self {
15511551
server,
15521552
access_control_sentinel,

0 commit comments

Comments
 (0)