mirror of
https://github.com/rutgersc/m3u8-rs.git
synced 2025-01-03 03:38:40 +00:00
Migrate to Rust 2018
Cleans up some noise.
This commit is contained in:
parent
81398f86cd
commit
0ed0ce51f8
6 changed files with 10 additions and 31 deletions
|
@ -7,6 +7,7 @@ repository = "https://github.com/rutgersc/m3u8-rs"
|
|||
description = "A library for parsing m3u8 files (Apple's HTTP Live Streaming (HLS) protocol)."
|
||||
documentation = "https://rutgersc.github.io/doc/m3u8_rs/index.html"
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
nom = { version = "7", optional = true }
|
||||
|
|
|
@ -12,12 +12,6 @@ To use this library, add the following dependency to `Cargo.toml`:
|
|||
m3u8-rs = "1.0.6"
|
||||
```
|
||||
|
||||
And add the crate to `lib.rs`
|
||||
|
||||
```rust
|
||||
extern crate m3u8_rs;
|
||||
```
|
||||
|
||||
Also available on [crates.io](https://crates.io/crates/m3u8-rs)
|
||||
|
||||
# Documentation
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
extern crate m3u8_rs;
|
||||
extern crate nom;
|
||||
|
||||
use m3u8_rs::playlist::Playlist;
|
||||
use std::io::Read;
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
extern crate m3u8_rs;
|
||||
extern crate nom;
|
||||
|
||||
use m3u8_rs::playlist::Playlist;
|
||||
use std::io::Read;
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
//! Parsing a playlist and let the parser figure out if it's a media or master playlist.
|
||||
//!
|
||||
//! ```
|
||||
//! extern crate nom;
|
||||
//! extern crate m3u8_rs;
|
||||
//! use m3u8_rs::playlist::Playlist;
|
||||
//! use nom::IResult;
|
||||
//! use std::io::Read;
|
||||
|
@ -28,8 +26,6 @@
|
|||
//! Parsing a master playlist directly
|
||||
//!
|
||||
//! ```
|
||||
//! extern crate nom;
|
||||
//! extern crate m3u8_rs;
|
||||
//! use std::io::Read;
|
||||
//! use nom::IResult;
|
||||
//!
|
||||
|
@ -48,7 +44,6 @@
|
|||
//! Creating a playlist and writing it back to a vec/file
|
||||
//!
|
||||
//! ```
|
||||
//! extern crate m3u8_rs;
|
||||
//! use m3u8_rs::playlist::{MediaPlaylist, MediaPlaylistType, MediaSegment};
|
||||
//!
|
||||
//! fn main() {
|
||||
|
@ -79,20 +74,18 @@
|
|||
//!
|
||||
//! ```
|
||||
|
||||
extern crate nom;
|
||||
|
||||
pub mod playlist;
|
||||
|
||||
use self::nom::bytes::complete::{tag, take, is_not, is_a, take_while1, take_until};
|
||||
use self::nom::character::is_digit;
|
||||
use self::nom::character::complete::{digit1, multispace0, space0, line_ending, not_line_ending, char, none_of};
|
||||
use self::nom::sequence::{delimited, preceded, tuple, pair, terminated};
|
||||
use self::nom::combinator::{map, map_res, opt, peek, eof, complete};
|
||||
use self::nom::multi::{fold_many0, many0};
|
||||
use self::nom::branch::alt;
|
||||
use nom::bytes::complete::{tag, take, is_not, is_a, take_while1, take_until};
|
||||
use nom::character::is_digit;
|
||||
use nom::character::complete::{digit1, multispace0, space0, line_ending, not_line_ending, char, none_of};
|
||||
use nom::sequence::{delimited, preceded, tuple, pair, terminated};
|
||||
use nom::combinator::{map, map_res, opt, peek, eof, complete};
|
||||
use nom::multi::{fold_many0, many0};
|
||||
use nom::branch::alt;
|
||||
|
||||
use self::nom::IResult;
|
||||
use playlist::*;
|
||||
use nom::IResult;
|
||||
use crate::playlist::*;
|
||||
use std::collections::HashMap;
|
||||
use std::f32;
|
||||
use std::result::Result;
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#![allow(unused_variables, unused_imports, dead_code)]
|
||||
|
||||
extern crate m3u8_rs;
|
||||
extern crate nom;
|
||||
|
||||
use m3u8_rs::playlist::*;
|
||||
use m3u8_rs::*;
|
||||
use nom::AsBytes;
|
||||
|
|
Loading…
Reference in a new issue