Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Commit

Permalink
Update. (#4)
Browse files Browse the repository at this point in the history
* Comments in Cargo.toml.

* Update to rc. Fixed typo in docs.

* Change master doc path.
Remove accidental `bench.json`.
Remove `homepage` from `Cargo.toml`.

* Fix master doc badge.

* Fix master doc badge.

* Change to release version of `cargo-tarpaulin`.

* Change used branch for cargo-travis.

* Remove test coverage. Update ccargo-travis.

Some typos in `README.md`.

* Debugging cargo-travis.

* Debugging cargo-travis.

* Updating travis script and some comments.

* Rust 33 isn't out yet.

* Ready for release.
  • Loading branch information
daxpedda committed Feb 25, 2019
1 parent 2eb1079 commit 7182729
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -27,7 +27,7 @@ assignees: ''
<!-- or ideas how to implement the addition or change -->

**Version**
- OS: <!-- e.g. Windows, OSX or Linux. -->
- OS: <!-- e.g. Linux, OS X or Windows. -->
- Rust: <!-- from `cargo version`, e.g. 1.32.0-nightly -->

**Notes**
Expand Down
15 changes: 3 additions & 12 deletions .travis/build.sh
Expand Up @@ -52,10 +52,8 @@ if [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_RUST_VERSION == "nightly" ]; t
cargo install-update cargo-update
cargo install cargo-audit
cargo install-update cargo-audit
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin --git "https://github.com/xd009642/tarpaulin.git" --branch "develop"
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install-update cargo-tarpaulin -g
cargo install cargo-travis --git "https://github.com/daxpedda/cargo-travis.git" --branch "temporary"
cargo install-update cargo-travis -g
cargo install cargo-travis --git "https://github.com/roblabla/cargo-travis.git"
cargo install-update cargo-travis --git

# check rust RustSec db
cargo audit || exit_code=1
Expand All @@ -67,14 +65,7 @@ if [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_RUST_VERSION == "nightly" ]; t
eval "$(ssh-agent -s)"
ssh-add ".travis/github_deploy_key"
# upload documentation
cargo doc-upload --branch $TRAVIS_BRANCH --clobber-index || exit_code=1

# do some test coverage
cargo tarpaulin --out Xml --ignore-tests --verbose || exit_code=1
bash <(curl -s https://codecov.io/bash) || exit_code=1
# do some more test coverage in release mode
cargo tarpaulin --release --out Xml --ignore-tests --verbose || exit_code=1
bash <(curl -s https://codecov.io/bash) || exit_code=1
cargo doc-upload --branch $TRAVIS_BRANCH --clobber-index --path $TRAVIS_BRANCH/doc/ || exit_code=1
fi

# pass the exit code to travis
Expand Down
11 changes: 5 additions & 6 deletions Cargo.toml
@@ -1,11 +1,10 @@
[package]
name = "unchecked_unwrap"
version = "1.0.0"
version = "1.0.1"
authors = ["daxpedda <daxpedda@users.noreply.github.com>"]
edition = "2018"
description = "Adds an unchecked version of `unwrap()` and `expect()` to Option and Result."
documentation = "https://docs.rs/crate/unchecked_unwrap/"
homepage = "https://github.com/daxpedda/unchecked_unwrap/"
repository = "https://github.com/daxpedda/unchecked_unwrap/tree/stable/"
readme = "README.MD"
keywords = ["unwrap", "unchecked", "expect", "result", "option"]
Expand All @@ -15,21 +14,21 @@ exclude = ["/.travis.yml", "/.github/*", "/.travis/*"]

[badges]
travis-ci = { repository = "daxpedda/unchecked_unwrap", branch = "stable" }
# TODO: wait for tarpaulin to fix some issues regarding uncovered lines
# codecov = { repository = "daxpedda/unchecked_unwrap", branch = "stable" }
# this looks excessive for a small library like that
#is-it-maintained-issue-resolution = { repository = "daxpedda/unchecked_unwrap" }
#is-it-maintained-open-issues = { repository = "daxpedda/unchecked_unwrap" }
# is-it-maintained-issue-resolution = { repository = "daxpedda/unchecked_unwrap" }
# is-it-maintained-open-issues = { repository = "daxpedda/unchecked_unwrap" }
maintenance = { status = "actively-developed" }

[features]
default = ["debug_checks"]
debug_checks = []
doc_include = []

# cleaning some output from `cargo test` and `cargo bench`
[lib]
test = false
bench = false

# docs.rs needs some pointers to do proper documentation
[package.metadata.docs.rs]
features = ["doc_include"]
17 changes: 5 additions & 12 deletions README.md
Expand Up @@ -11,14 +11,12 @@
**[Release](https://github.com/daxpedda/unchecked_unwrap/tree/release/):**
[![Build](https://img.shields.io/travis/daxpedda/unchecked_unwrap/release.svg?label=build:%20release)](https://travis-ci.org/daxpedda/unchecked_unwrap/branches/)
[![Docs](https://docs.rs/unchecked_unwrap/badge.svg)](https://docs.rs/unchecked_unwrap/)
[![Coverage](https://img.shields.io/codecov/c/github/daxpedda/unchecked_unwrap/release.svg?label=coverage:%20release)](https://codecov.io/github/daxpedda/unchecked_unwrap/branch/release/)

**[Master](https://github.com/daxpedda/unchecked_unwrap/):**
[![Build](https://img.shields.io/travis/daxpedda/unchecked_unwrap/master.svg?label=build:%20master)](https://travis-ci.org/daxpedda/unchecked_unwrap/branches/)
[![Docs](https://raw.githack.com/daxpedda/unchecked_unwrap/gh-pages/master/badge.svg)](https://daxpedda.github.io/unchecked_unwrap/master/index.html)
[![Coverage](https://img.shields.io/codecov/c/github/daxpedda/unchecked_unwrap/master.svg?label=coverage:%20master)](https://codecov.io/github/daxpedda/unchecked_unwrap/branch/master/)
[![Docs](https://img.shields.io/badge/endpoint.svg?url=https://daxpedda.github.io/unchecked_unwrap/master/doc/badge.json)](https://daxpedda.github.io/unchecked_unwrap/master/doc/index.html)

Adds an unchecked version of `unwrap()` and `expect()` to `Option` and `Result` for the rust programmming language.
Adds an unchecked version of `unwrap()` and `expect()` to `Option` and `Result` for the rust programming language.
Supports `no_std`.

## Branches
Expand Down Expand Up @@ -51,26 +49,21 @@ assert_eq!(unsafe { x.unchecked_expect("the sky is falling down") }, 2);
## Documentation

Documentation is available online in the badge links above.
Currently nightly is needed for full documentation: `cargo doc --features doc_include`
If you are not on nightly only use `cargo doc`.
Currently, nightly is needed for full documentation: `cargo doc --features doc_include`
If you are not using nightly, use `cargo doc` as usual.

## Tests

Is as simple as `cargo test` and `cargo test --release`.

## Test coverage

Test coverage is currently done by [Tarpaulin](https://github.com/xd009642/tarpaulin), which currently is missing some lines.
I removed the badge from [Crates.io](https://crates.io/crates/unchecked_unwrap/) because it is misleading.

## Benchmarking

Is as simple as `cargo bench`.
Currently the nightly version of rust is needed for benchmarking.

## CI

This crate is checked daily by CI to make sure that it builds successfully with the newest versions rust stable, beta and nightly.
This crate is checked daily by CI to make sure that it builds successfully with the newest versions of rust stable, beta and nightly.

## Alternatives

Expand Down
8 changes: 0 additions & 8 deletions bench.json

This file was deleted.

0 comments on commit 7182729

Please sign in to comment.