Skip to content

Commit a131136

Browse files
committed
Merge branch 'lapin-3.x'
2 parents 9b80873 + 358d183 commit a131136

5 files changed

Lines changed: 46 additions & 28 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
target
22
.env
3+
.idea

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### 3.2.1 (2025-08-19)
2+
3+
#### Misc
4+
5+
* Add `Acker::mock()` to help writing tests in external programs
6+
17
### 3.2.0 (2025-08-11)
28

39
#### Features

Cargo.lock

Lines changed: 27 additions & 27 deletions
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 = "lapin"
3-
version = "3.2.0"
3+
version = "3.2.1"
44
edition = "2024"
55
authors = ["Geoffroy Couprie <geo.couprie@gmail.com>", "Marc-Antoine Perennou <Marc-Antoine@Perennou.com>"]
66
description = "AMQP client library"

src/acker.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ impl Acker {
3535
}
3636
}
3737

38+
pub fn mock() -> Self {
39+
Self {
40+
channel_id: 0,
41+
delivery_tag: 0,
42+
internal_rpc: None,
43+
error: None,
44+
killswitch: Default::default(),
45+
channel_killswitch: Default::default(),
46+
}
47+
}
48+
3849
pub async fn ack(&self, options: BasicAckOptions) -> Result<bool> {
3950
self.rpc(|internal_rpc, resolver| {
4051
internal_rpc.basic_ack(

0 commit comments

Comments
 (0)