Skip to content

Commit dfca673

Browse files
committed
Update to edition 2018
1 parent 9d9e40c commit dfca673

File tree

6 files changed

+23
-29
lines changed

6 files changed

+23
-29
lines changed

.travis.yml

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
language: rust
22
rust:
33
- stable
4-
before_script:
5-
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
64
script:
7-
- travis-cargo build
8-
- travis-cargo test
9-
- travis-cargo doc
10-
after_success:
11-
- travis-cargo doc-upload
12-
env:
13-
global:
14-
secure: FOH1fS4rH3js3BaoYUsFCIcr4ODpBXARpEbF+jpaRQyNS5Ch+NzLUz2Pj8gLbf6I1rGoF+mLANRbP6kfvwzZFa7/mSmiQ0Tfkm3HwDA623H35ocbbFjDNHd4ttP6Uu16M+KXm35hgj7C8iAUXCloX2KZOquB5UHbUVk65rPEtEU=
5+
- cargo build
6+
- cargo test
7+
- cargo doc

Cargo.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
[package]
22

33
name = "open"
4-
version = "1.3.2"
4+
version = "1.3.3"
55
authors = ["Sebastian Thiel <[email protected]>"]
66
license = "MIT"
7+
edition = "2018"
8+
readme = "README.md"
79
description = "Open a path or URL using the program configured on the system"
810
repository = "https://github.com/Byron/open-rs"
911
keywords = ["open", "xdg-open", "start", "launch"]
10-
documentation = "http://byron.github.io/open-rs"
11-
exclude = ["/etc/*", "/.clog.toml", "/.travis.yml"]
12+
include = ["src/**/*.rs", "Cargo.toml"]
1213

1314
[[bin]]
1415
test = false

README.md

-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ Add this to your Cargo.toml
1919
[dependencies]
2020
open = "*"
2121
```
22-
23-
Add this to your lib ...
24-
```Rust
25-
extern crate open;
26-
```
27-
2822
... and open something using
2923
```Rust
3024
open::that("https://rust-lang.org");

changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<a name="v1.2.0"></a>
2+
## v1.3.3 (2020-02-01)
3+
4+
* update code and crate to Edition 2018
5+
26
## v1.2.0 (2017-01-31)
37

48
* **windows**: escape '&' in URLs. On windows, a shell is used to execute the command, which

src/lib.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
#[cfg(windows)]
4141
extern crate winapi;
4242

43-
#[cfg(not(target_os = "windows"))]
44-
use std::process::{Command, Stdio};
45-
46-
use std::ffi::OsStr;
47-
use std::io;
48-
use std::process::ExitStatus;
49-
use std::thread;
43+
use std::{
44+
ffi::OsStr,
45+
process::{Command, Stdio},
46+
io,
47+
process::ExitStatus,
48+
thread
49+
};
5050

5151
#[cfg(not(any(target_os = "windows", target_os = "macos")))]
5252
pub fn that<T: AsRef<OsStr> + Sized>(path: T) -> io::Result<ExitStatus> {

src/main.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
extern crate open;
22

3-
use std::env;
4-
use std::io::{stderr, Write};
5-
use std::process;
3+
use std::{
4+
env,
5+
io::{stderr, Write},
6+
process
7+
};
68

79
fn main() {
810
let path_or_url = match env::args().nth(1) {

0 commit comments

Comments
 (0)