diff --git a/.travis.yml b/.travis.yml index cfc3b21..a607427 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,7 @@ language: rust rust: - stable -before_script: -- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH script: -- travis-cargo build -- travis-cargo test -- travis-cargo doc -after_success: -- travis-cargo doc-upload -env: - global: - secure: FOH1fS4rH3js3BaoYUsFCIcr4ODpBXARpEbF+jpaRQyNS5Ch+NzLUz2Pj8gLbf6I1rGoF+mLANRbP6kfvwzZFa7/mSmiQ0Tfkm3HwDA623H35ocbbFjDNHd4ttP6Uu16M+KXm35hgj7C8iAUXCloX2KZOquB5UHbUVk65rPEtEU= +- cargo build +- cargo test +- cargo doc diff --git a/Cargo.toml b/Cargo.toml index d1dac94..a3aa24b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "open" -version = "1.3.2" +version = "1.3.3" authors = ["Sebastian Thiel "] license = "MIT" +edition = "2018" +readme = "README.md" description = "Open a path or URL using the program configured on the system" repository = "https://github.com/Byron/open-rs" keywords = ["open", "xdg-open", "start", "launch"] -documentation = "http://byron.github.io/open-rs" -exclude = ["/etc/*", "/.clog.toml", "/.travis.yml"] +include = ["src/**/*.rs", "Cargo.toml"] [[bin]] test = false diff --git a/README.md b/README.md index 7f951cb..8a818c1 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,6 @@ Add this to your Cargo.toml [dependencies] open = "*" ``` - -Add this to your lib ... -```Rust -extern crate open; -``` - ... and open something using ```Rust open::that("https://rust-lang.org"); diff --git a/changelog.md b/changelog.md index 8d01050..e1eec2d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,8 @@ +## v1.3.3 (2020-02-01) + +* update code and crate to Edition 2018 + ## v1.2.0 (2017-01-31) * **windows**: escape '&' in URLs. On windows, a shell is used to execute the command, which diff --git a/src/lib.rs b/src/lib.rs index ddf5999..65e3501 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,13 +40,13 @@ #[cfg(windows)] extern crate winapi; -#[cfg(not(target_os = "windows"))] -use std::process::{Command, Stdio}; - -use std::ffi::OsStr; -use std::io; -use std::process::ExitStatus; -use std::thread; +use std::{ + ffi::OsStr, + process::{Command, Stdio}, + io, + process::ExitStatus, + thread +}; #[cfg(not(any(target_os = "windows", target_os = "macos")))] pub fn that + Sized>(path: T) -> io::Result { diff --git a/src/main.rs b/src/main.rs index ea83112..27a0461 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,10 @@ extern crate open; -use std::env; -use std::io::{stderr, Write}; -use std::process; +use std::{ + env, + io::{stderr, Write}, + process +}; fn main() { let path_or_url = match env::args().nth(1) {