do not log parameters

This commit is contained in:
Aiden McClelland
2023-03-15 12:19:11 -06:00
parent a615882b3f
commit c96628ad49
58 changed files with 215 additions and 215 deletions

View File

@@ -21,19 +21,19 @@ struct SoundInterface {
guard: Option<FileLock>,
}
impl SoundInterface {
#[instrument]
#[instrument(skip_all)]
pub async fn lease() -> Result<Self, Error> {
let guard = FileLock::new(SOUND_LOCK_FILE, true).await?;
Ok(SoundInterface { guard: Some(guard) })
}
#[instrument(skip(self))]
#[instrument(skip_all)]
pub async fn close(mut self) -> Result<(), Error> {
if let Some(lock) = self.guard.take() {
lock.unlock().await?;
}
Ok(())
}
#[instrument(skip(self))]
#[instrument(skip_all)]
pub async fn play_for_time_slice(
&mut self,
tempo_qpm: u16,
@@ -59,7 +59,7 @@ impl<'a, T> Song<T>
where
T: IntoIterator<Item = (Option<Note>, TimeSlice)> + Clone,
{
#[instrument(skip(self))]
#[instrument(skip_all)]
pub async fn play(&self) -> Result<(), Error> {
let mut sound = SoundInterface::lease().await?;
for (note, slice) in self.note_sequence.clone() {