mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-11-15 20:01:01 +00:00
19 lines
408 B
Rust
19 lines
408 B
Rust
|
extern crate hls_m3u8;
|
||
|
#[macro_use]
|
||
|
extern crate trackable;
|
||
|
|
||
|
use std::io::{self, Read};
|
||
|
use trackable::error::Failure;
|
||
|
|
||
|
fn main() {
|
||
|
let mut m3u8 = String::new();
|
||
|
track_try_unwrap!(
|
||
|
io::stdin()
|
||
|
.read_to_string(&mut m3u8)
|
||
|
.map_err(Failure::from_error)
|
||
|
);
|
||
|
for line in hls_m3u8::line::Lines::new(&m3u8) {
|
||
|
println!("{:?}", track_try_unwrap!(line));
|
||
|
}
|
||
|
}
|