Skip to content

Commit

Permalink
Update example and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-tkach committed Oct 3, 2017
1 parent e1b5f65 commit 4e0dcca
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "os_info"
version = "0.1.0"
version = "0.1.1"
authors = ["Jan Schulte <[email protected]>", "Stanislav Tkach <[email protected]>"]
description = "Detect the operating system type and version."
documentation = "https://docs.rs/os_info"
Expand Down
7 changes: 6 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.1.0](https://github.com/darkeld3r/os_info/tree/0.0.1) (2017-08-25)
## [0.1.1](https://github.com/darkeld3r/os_info/tree/v0.1.1) (2017-10-03)

- Examples have been updated slightly.
- Readme has been updated.

## [0.1.0](https://github.com/darkeld3r/os_info/tree/v0.1.0) (2017-10-03)

The first release containing only minor infrastructural changes and based on [os_type](https://github.com/schultyy/os_type) by Jan Schulte.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,22 @@ To use this crate, add `os_info` as a dependency to your project's Cargo.toml:

```toml
[dependencies]
os_info = "0.1.0"
os_info = "0.1.1"
```

## Example

```rust
extern crate os_info;

let os = os_info::current_platform();
println!("Type: {:?}", os.os_type);
println!("Version: {}", os.version);
let os = os_info::get();

// Print full information:
println!("OS information: {}", info);

// Print information separately:
println!("Type: {}", info.os_type());
println!("Version: {}", info.version());
```

Right now, the following operating system types can be returned:
Expand Down
6 changes: 6 additions & 0 deletions examples/print_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@ extern crate os_info;

fn main() {
let info = os_info::get();

// Print full information:
println!("OS information: {}", info);

// Print information separately:
println!("Type: {}", info.os_type());
println!("Version: {}", info.version());
}

0 comments on commit 4e0dcca

Please sign in to comment.