Skip to content

Commit b638b71

Browse files
committed
Fix for deepsource test
1 parent f998d27 commit b638b71

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sms-server"
3-
version = "3.6.0"
3+
version = "3.6.1"
44
edition = "2021"
55
license = "AGPL-3.0-only"
66
build = "build.rs"

src/modem/buffer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ impl LineBuffer {
8888
let trim_to = self.buffer[..keep_from]
8989
.iter()
9090
.rposition(|&b| b == b'\n')
91-
.map(|pos| pos + 1)
92-
.unwrap_or(keep_from);
91+
.map_or(keep_from, |pos| pos + 1);
9392

9493
self.buffer.drain(..trim_to);
9594
}

0 commit comments

Comments
 (0)