Merge branch 'feat' into 'main'

"Fix" CI complaints about "Conversation"

See merge request tpo/core/arti!1402
This commit is contained in:
Alexander Færøy 2023-07-12 15:34:45 +00:00
commit 89a3d43aa6
3 changed files with 4 additions and 2 deletions

View File

@ -746,12 +746,12 @@ impl ClientCirc {
pub struct Conversation<'r>(&'r ClientCirc);
#[cfg(feature = "send-control-msg")]
#[cfg_attr(docsrs, doc(cfg(feature = "send-control-msg")))]
impl Conversation<'_> {
/// Send a protocol message as part of an ad-hoc exchange
///
/// Responses are handled by the `MsgHandler` set up
/// when the `Conversation` was created.
#[cfg(feature = "send-control-msg")]
pub async fn send_message(&self, msg: tor_cell::relaycell::msg::AnyRelayMsg) -> Result<()> {
self.send_internal(Some(msg), None).await
}

View File

@ -1519,6 +1519,7 @@ impl Reactor {
}
#[cfg(feature = "send-control-msg")]
#[cfg_attr(docsrs, doc(cfg(feature = "send-control-msg")))]
impl ConversationInHandler<'_, '_, '_> {
/// 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
// tor-proto interface.
#[cfg(feature = "send-control-msg")]
pub fn send_message(&mut self, msg: tor_cell::relaycell::msg::AnyRelayMsg) -> Result<()> {
let msg = tor_cell::relaycell::AnyRelayCell::new(0.into(), msg);

View File

@ -45,6 +45,8 @@ additional_provided['tor-proto']= [
additional_required['tor-proto']= [
('CtrlMsg', '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