Fix clippy warnings

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko 2022-02-24 11:46:22 -08:00
parent 996c8e6aa8
commit fa0d72f516
2 changed files with 6 additions and 6 deletions

View File

@ -57,15 +57,13 @@ impl Shim for Service {
_publisher: RemotePublisher,
_config: &mut Config,
) -> Self {
let mut service = Service {
// TODO: add publisher
Service {
exit: Arc::new(ExitSignal::default()),
id: id.to_string(),
namespace: namespace.to_string(),
};
// TODO: add publisher
service
}
}
fn start_shim(&mut self, opts: StartOpts) -> Result<String> {

View File

@ -113,9 +113,11 @@ pub struct StartOpts {
/// Helper structure that wraps atomic bool to signal shim server when to shutdown the TTRPC server.
///
/// Shim implementations are responsible for calling [`Self::signal`].
#[allow(clippy::mutex_atomic)] // Condvar expected to be used with Mutex, not AtomicBool.
#[derive(Default)]
pub struct ExitSignal(Mutex<bool>, Condvar);
#[allow(clippy::mutex_atomic)]
impl ExitSignal {
/// Set exit signal to shutdown shim server.
pub fn signal(&self) {