TestComponent: rename _send_stanza method

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-09-24 01:29:46 +02:00
parent c438402b15
commit eba5ea9773

View file

@ -211,7 +211,7 @@ impl TestComponent {
.push_back(Expect::Presence(Box::new(callback), desc.into()))
}
fn _send_stanza<E: Into<TestElement> + Send>(&mut self, el: E) -> Result<(), Error> {
fn send_stanza_inner<E: Into<TestElement> + Send>(&mut self, el: E) -> Result<(), Error> {
let out: TestElement = el.into();
let expected = self.expect_buffer.pop_front();
@ -277,13 +277,13 @@ impl Drop for TestComponent {
#[async_trait]
impl ComponentTrait for TestComponent {
async fn send_stanza<E: Into<Element> + Send>(&mut self, el: E) -> Result<(), Error> {
self._send_stanza(el.into())
self.send_stanza_inner(el.into())
}
}
#[async_trait]
impl ComponentTrait for &mut TestComponent {
async fn send_stanza<E: Into<Element> + Send>(&mut self, el: E) -> Result<(), Error> {
self._send_stanza(el.into())
self.send_stanza_inner(el.into())
}
}