Skip to content

Commit 388ff89

Browse files
committed
Format code
1 parent 020eb9a commit 388ff89

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

src/media/streaming.rs

+9-18
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,9 @@ impl Stream {
4242
raw_streams
4343
.adaptive_hls
4444
.as_ref()
45-
.map_or(
46-
Err(Error::Input {
47-
message: "no stream available".to_string(),
48-
}),
49-
Ok,
50-
)?
45+
.ok_or(Error::Input {
46+
message: "no stream available".to_string(),
47+
})?
5148
.url
5249
.clone(),
5350
)
@@ -63,12 +60,9 @@ impl Stream {
6360
raw_streams
6461
.adaptive_hls
6562
.as_ref()
66-
.map_or(
67-
Err(Error::Input {
68-
message: "no stream available".to_string(),
69-
}),
70-
Ok,
71-
)?
63+
.ok_or(Error::Input {
64+
message: "no stream available".to_string(),
65+
})?
7266
.url
7367
.clone(),
7468
)
@@ -79,12 +73,9 @@ impl Stream {
7973
raw_streams
8074
.adaptive_hls
8175
.as_ref()
82-
.map_or(
83-
Err(Error::Input {
84-
message: "no stream available".to_string(),
85-
}),
86-
Ok,
87-
)?
76+
.ok_or(Error::Input {
77+
message: "no stream available".to_string(),
78+
})?
8879
.url
8980
.clone(),
9081
)

src/rating/comment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ where
324324
match flags.len() {
325325
0 => Ok(false),
326326
1 => {
327-
if flags.get(0).unwrap() == "spoiler" {
327+
if flags[0] == "spoiler" {
328328
Ok(true)
329329
} else {
330330
Err(Error::custom(format!(

0 commit comments

Comments
 (0)