Skip to content

Commit 2cd2346

Browse files
committed
Fix map_clone and explicit truncate when file is create
Signed-off-by: Christian König <[email protected]>
1 parent 9929635 commit 2cd2346

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

core/src/session.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,7 @@ impl Session {
513513
}
514514

515515
pub fn get_user_attribute(&self, key: &str) -> Option<String> {
516-
self.0
517-
.data
518-
.read()
519-
.user_data
520-
.attributes
521-
.get(key)
522-
.map(Clone::clone)
516+
self.0.data.read().user_data.attributes.get(key).cloned()
523517
}
524518

525519
fn weak(&self) -> SessionWeak {

playback/src/audio_backend/pipe.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ impl Sink for StdoutSink {
6666
OpenOptions::new()
6767
.write(true)
6868
.create(true)
69+
.truncate(true)
6970
.open(file)
7071
.map_err(|e| StdoutError::OpenFailure {
7172
file: file.to_string(),

0 commit comments

Comments
 (0)