connection: Unneeded return value

This commit is contained in:
Maxime “pep” Buquet 2017-12-28 06:18:31 +01:00
parent 06fd0a354a
commit 690e83725c

View file

@ -29,13 +29,15 @@ impl Connection for C2S {
elem.push_attribute(("id", id)); elem.push_attribute(("id", id));
elem.push_attribute(("xmlns", ns::CLIENT)); elem.push_attribute(("xmlns", ns::CLIENT));
elem.push_attribute(("xmlns:stream", ns::STREAM)); elem.push_attribute(("xmlns:stream", ns::STREAM));
transport.write_event(WriterEvent::Start(elem)) transport.write_event(WriterEvent::Start(elem));
Ok(())
} }
fn close<T: Transport>(transport: &mut T) -> Result<(), Error> { fn close<T: Transport>(transport: &mut T) -> Result<(), Error> {
let name = "stream:stream"; let name = "stream:stream";
let elem = BytesEnd::borrowed(name.as_bytes()); let elem = BytesEnd::borrowed(name.as_bytes());
transport.write_event(WriterEvent::End(elem)) transport.write_event(WriterEvent::End(elem));
Ok(())
} }
} }
@ -54,12 +56,14 @@ impl Connection for Component2S {
elem.push_attribute(("id", id)); elem.push_attribute(("id", id));
elem.push_attribute(("xmlns", ns::COMPONENT_ACCEPT)); elem.push_attribute(("xmlns", ns::COMPONENT_ACCEPT));
elem.push_attribute(("xmlns:stream", ns::STREAM)); elem.push_attribute(("xmlns:stream", ns::STREAM));
transport.write_event(WriterEvent::Start(elem)) transport.write_event(WriterEvent::Start(elem));
Ok(())
} }
fn close<T: Transport>(transport: &mut T) -> Result<(), Error> { fn close<T: Transport>(transport: &mut T) -> Result<(), Error> {
let name = "stream:stream"; let name = "stream:stream";
let elem = BytesEnd::borrowed(name.as_bytes()); let elem = BytesEnd::borrowed(name.as_bytes());
transport.write_event(WriterEvent::End(elem)) transport.write_event(WriterEvent::End(elem));
Ok(())
} }
} }