mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Fix map_clone and explicit truncate when file is create
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
9929635b5b
commit
2cd2346edb
2 changed files with 2 additions and 7 deletions
|
@ -513,13 +513,7 @@ impl Session {
|
|||
}
|
||||
|
||||
pub fn get_user_attribute(&self, key: &str) -> Option<String> {
|
||||
self.0
|
||||
.data
|
||||
.read()
|
||||
.user_data
|
||||
.attributes
|
||||
.get(key)
|
||||
.map(Clone::clone)
|
||||
self.0.data.read().user_data.attributes.get(key).cloned()
|
||||
}
|
||||
|
||||
fn weak(&self) -> SessionWeak {
|
||||
|
|
|
@ -66,6 +66,7 @@ impl Sink for StdoutSink {
|
|||
OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
.truncate(true)
|
||||
.open(file)
|
||||
.map_err(|e| StdoutError::OpenFailure {
|
||||
file: file.to_string(),
|
||||
|
|
Loading…
Reference in a new issue