Fix clippy warnings
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
996c8e6aa8
commit
fa0d72f516
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue