Skip to content

Commit

Permalink
Merge pull request #2 from amiyzku/issue#1
Browse files Browse the repository at this point in the history
Issue#1
  • Loading branch information
amiyzku authored Oct 25, 2023
2 parents 7b992f9 + d3e3cd0 commit 04adc44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ A simple CLI tool to set the microphone volume to the maximum in MacOS.

```bash
sudo mv max-mic-volume /usr/local/bin/
sudo chmod 755 /usr/local/bin/max-mic-volume

sudo curl -o /Library/LaunchDaemons/com.github.amiyzku.max-mic-volume.plist https://raw.githubusercontent.com/amiyzku/max-mic-volume/master/com.github.amiyzku.max-mic-volume.plist
sudo chown root:wheel /Library/LaunchDaemons/com.github.amiyzku.max-mic-volume.plist
sudo chmod 644 /Library/LaunchDaemons/com.github.amiyzku.max-mic-volume.plist
sudo curl -o /Library/LaunchAgents/com.github.amiyzku.max-mic-volume.plist https://raw.githubusercontent.com/amiyzku/max-mic-volume/master/com.github.amiyzku.max-mic-volume.plist
sudo chmod 644 /Library/LaunchAgents/com.github.amiyzku.max-mic-volume.plist

launchctl load /Library/LaunchAgents/com.github.amiyzku.max-mic-volume.plist
```
2 changes: 1 addition & 1 deletion src/mic_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::ptr::null;

use crate::volume::Volume;

#[derive(Debug)]
#[derive(Debug, PartialEq, Eq)]
pub struct MicDevice {
device_id: u32,
}
Expand Down
8 changes: 1 addition & 7 deletions src/volume.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[derive(Debug)]
#[derive(Debug, PartialEq, PartialOrd)]
pub struct Volume(f32);

impl Volume {
Expand All @@ -20,12 +20,6 @@ impl Volume {
}
}

impl PartialEq for Volume {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 04adc44

Please sign in to comment.