Skip to content

Commit

Permalink
Silence a few warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelherger committed Sep 20, 2024
1 parent 58e4c97 commit 236ef13
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ env:
# 4. cross compilation on Windows and Linux/ARM

jobs:
if: false
fmt:
name: cargo fmt
runs-on: ubuntu-latest
Expand Down Expand Up @@ -177,7 +178,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/[email protected]

# hyper-rustls >=0.27 uses aws-lc as default backend which requires NASM to build
- name: Install NASM
uses: ilammy/[email protected]
Expand Down Expand Up @@ -225,7 +226,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
target:
target:
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
Expand Down Expand Up @@ -263,7 +264,7 @@ jobs:

- name: Install the cross compiler rust targets
run: rustup target add ${{ matrix.target }}

- name: Install cross compiler
run: |
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
Expand All @@ -275,12 +276,12 @@ jobs:
if [ ${{ matrix.target }} = "riscv64gc-unknown-linux-gnu" ]; then
sudo apt-get install -y gcc-riscv64-linux-gnu
fi
- name: Set target link compiler
run: |
# Convert target to uppercase and replace - with _
target=${{ matrix.target }}
target=${target^^}
target=${target^^}
target=${target//-/_}
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
echo "CARGO_TARGET_${target}_LINKER=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
Expand All @@ -291,11 +292,11 @@ jobs:
if [ ${{ matrix.target }} = "riscv64gc-unknown-linux-gnu" ]; then
echo "CARGO_TARGET_${target}_LINKER=riscv64-linux-gnu-gcc" >> $GITHUB_ENV
fi
- name: Fetch
run: cargo fetch --locked
- name: Build
run: cargo build --frozen --verbose --target ${{ matrix.target }} --no-default-features

- name: Check binary
run: file target/${{ matrix.target }}/debug/librespot
18 changes: 9 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ use librespot::{

#[cfg(feature = "spotty")]
mod spotty;
#[cfg(feature = "spotty")]
use spotty::LMS;
// #[cfg(feature = "spotty")]
// use spotty::LMS;

const VERSION: &str = concat!(env!("CARGO_PKG_NAME"), " v", env!("CARGO_PKG_VERSION"));

Expand Down Expand Up @@ -248,7 +248,7 @@ struct Setup {
scopes: Option<String>,
get_token: bool,
save_token: Option<String>,
lms: LMS,
// lms: LMS,
}

fn get_setup() -> Setup {
Expand Down Expand Up @@ -1875,11 +1875,11 @@ fn get_setup() -> Setup {
let save_token = opt_str(SAVE_TOKEN).unwrap_or_else(|| "".to_string());
let client_id = opt_str(CLIENT_ID).unwrap_or_else(|| include_str!("client_id.txt").to_string());

let lms = LMS::new(
opt_str(LYRION_MUSIC_SERVER),
opt_str(PLAYER_MAC),
opt_str(LMS_AUTH),
);
// let lms = LMS::new(
// opt_str(LYRION_MUSIC_SERVER),
// opt_str(PLAYER_MAC),
// opt_str(LMS_AUTH),
// );

Setup {
format: AudioFormat::default(),
Expand Down Expand Up @@ -1918,7 +1918,7 @@ fn get_setup() -> Setup {
Some(client_id)
},
scopes: opt_str(SCOPE),
lms,
// lms,
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/spotty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use librespot::playback::config::{AudioFormat, PlayerConfig};
use librespot::playback::mixer::NoOpVolume;
use librespot::playback::player::{Player, PlayerEvent};

const VERSION: &str = concat!(env!("CARGO_PKG_NAME"), " v", env!("CARGO_PKG_VERSION"));
// const VERSION: &str = concat!(env!("CARGO_PKG_NAME"), " v", env!("CARGO_PKG_VERSION"));

const SCOPES: &str = "user-read-private,playlist-read-private,playlist-read-collaborative,playlist-modify-public,playlist-modify-private,user-follow-modify,user-follow-read,user-library-read,user-library-modify,user-top-read,user-read-recently-played";

Expand Down

0 comments on commit 236ef13

Please sign in to comment.