Merge branch 'feat' into 'main'
"Fix" CI complaints about "Conversation" See merge request tpo/core/arti!1402
This commit is contained in:
commit
89a3d43aa6
|
@ -746,12 +746,12 @@ impl ClientCirc {
|
||||||
pub struct Conversation<'r>(&'r ClientCirc);
|
pub struct Conversation<'r>(&'r ClientCirc);
|
||||||
|
|
||||||
#[cfg(feature = "send-control-msg")]
|
#[cfg(feature = "send-control-msg")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "send-control-msg")))]
|
||||||
impl Conversation<'_> {
|
impl Conversation<'_> {
|
||||||
/// Send a protocol message as part of an ad-hoc exchange
|
/// Send a protocol message as part of an ad-hoc exchange
|
||||||
///
|
///
|
||||||
/// Responses are handled by the `MsgHandler` set up
|
/// Responses are handled by the `MsgHandler` set up
|
||||||
/// when the `Conversation` was created.
|
/// when the `Conversation` was created.
|
||||||
#[cfg(feature = "send-control-msg")]
|
|
||||||
pub async fn send_message(&self, msg: tor_cell::relaycell::msg::AnyRelayMsg) -> Result<()> {
|
pub async fn send_message(&self, msg: tor_cell::relaycell::msg::AnyRelayMsg) -> Result<()> {
|
||||||
self.send_internal(Some(msg), None).await
|
self.send_internal(Some(msg), None).await
|
||||||
}
|
}
|
||||||
|
|
|
@ -1519,6 +1519,7 @@ impl Reactor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "send-control-msg")]
|
#[cfg(feature = "send-control-msg")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "send-control-msg")))]
|
||||||
impl ConversationInHandler<'_, '_, '_> {
|
impl ConversationInHandler<'_, '_, '_> {
|
||||||
/// Send a protocol message as part of an ad-hoc exchange
|
/// Send a protocol message as part of an ad-hoc exchange
|
||||||
///
|
///
|
||||||
|
@ -1530,7 +1531,6 @@ impl ConversationInHandler<'_, '_, '_> {
|
||||||
//
|
//
|
||||||
// TODO hs: it might be nice to avoid exposing tor-cell APIs in the
|
// TODO hs: it might be nice to avoid exposing tor-cell APIs in the
|
||||||
// tor-proto interface.
|
// tor-proto interface.
|
||||||
#[cfg(feature = "send-control-msg")]
|
|
||||||
pub fn send_message(&mut self, msg: tor_cell::relaycell::msg::AnyRelayMsg) -> Result<()> {
|
pub fn send_message(&mut self, msg: tor_cell::relaycell::msg::AnyRelayMsg) -> Result<()> {
|
||||||
let msg = tor_cell::relaycell::AnyRelayCell::new(0.into(), msg);
|
let msg = tor_cell::relaycell::AnyRelayCell::new(0.into(), msg);
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@ additional_provided['tor-proto']= [
|
||||||
additional_required['tor-proto']= [
|
additional_required['tor-proto']= [
|
||||||
('CtrlMsg', 'feature = "testing"'),
|
('CtrlMsg', 'feature = "testing"'),
|
||||||
('CreateResponse', 'feature = "testing"'),
|
('CreateResponse', 'feature = "testing"'),
|
||||||
|
# I have no idea, but empirically this stops the CI complaining -Diziet
|
||||||
|
('Conversation', 'feature = "send-control-msg"'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# This is detected two times, but only on cfg_attr(docsrs) is enough
|
# This is detected two times, but only on cfg_attr(docsrs) is enough
|
||||||
|
|
Loading…
Reference in New Issue