mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-04 02:09:26 +02:00
Update to Rust 2018
- Fix deprecated Error::cause warnings and missing dyn - Reset max_width - Add rustfmt to Travis - Run rustfmt on full codebase with `cargo fmt --all` - Add rustfmt to Travis - Complete migration to edition 2018 - Replace try! shorthand - Use explicit `dyn Trait`
This commit is contained in:
parent
be2ad9059a
commit
d26590afc5
45 changed files with 331 additions and 238 deletions
|
@ -5,9 +5,9 @@ use std::io::Read;
|
|||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use authentication::Credentials;
|
||||
use spotify_id::FileId;
|
||||
use volume::Volume;
|
||||
use crate::authentication::Credentials;
|
||||
use crate::spotify_id::FileId;
|
||||
use crate::volume::Volume;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Cache {
|
||||
|
@ -80,7 +80,7 @@ impl Cache {
|
|||
File::open(self.file_path(file)).ok()
|
||||
}
|
||||
|
||||
pub fn save_file(&self, file: FileId, contents: &mut Read) {
|
||||
pub fn save_file(&self, file: FileId, contents: &mut dyn Read) {
|
||||
if self.use_audio_cache {
|
||||
let path = self.file_path(file);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue