Skip to content

Commit d23787f

Browse files
committed
Rename to scoped-sleep, release 0.1.0
1 parent 347c9c0 commit d23787f

File tree

7 files changed

+92
-12
lines changed

7 files changed

+92
-12
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: /
5+
schedule:
6+
interval: daily
7+
commit-message:
8+
prefix: ''
9+
labels: []

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '0 15 * * *'
10+
11+
env:
12+
CARGO_INCREMENTAL: 0
13+
CARGO_NET_RETRY: 10
14+
CARGO_TERM_COLOR: always
15+
RUST_BACKTRACE: 1
16+
RUSTDOCFLAGS: -D warnings
17+
RUSTFLAGS: -D warnings
18+
RUSTUP_MAX_RETRIES: 10
19+
20+
defaults:
21+
run:
22+
shell: bash
23+
24+
jobs:
25+
test:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: dtolnay/rust-toolchain@stable
30+
with:
31+
components: clippy,rustfmt
32+
- run: cargo fmt --all --check
33+
- run: cargo clippy --all-targets
34+
- run: cargo build
35+
- run: cargo test

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ['v[0-9]+.*']
6+
7+
env:
8+
CARGO_INCREMENTAL: 0
9+
CARGO_NET_RETRY: 10
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
RUSTFLAGS: -D warnings
13+
RUSTUP_MAX_RETRIES: 10
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
19+
jobs:
20+
create-release:
21+
if: github.repository_owner == 'openrr'
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: dtolnay/rust-toolchain@stable
26+
- run: cargo package
27+
- uses: taiki-e/create-gh-release-action@v1
28+
with:
29+
branch: main
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
- run: cargo publish
33+
env:
34+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target
2+
Cargo.lock

Cargo.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
[package]
2-
name = "openrr-sleep"
3-
version = "0.0.6"
2+
name = "scoped-sleep"
3+
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
6-
description = "openrr sleep library"
7-
keywords = ["robotics", "robot"]
8-
categories = ["algorithms", "science::robotics"]
9-
repository = "https://github.com/openrr/openrr"
10-
11-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
6+
description = "RAII sleep"
7+
keywords = []
8+
categories = ["rust-patterns"]
9+
repository = "https://github.com/openrr/scoped-sleep"
1210

1311
[dependencies]

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# openrr-sleep
1+
# scoped-sleep
22

3-
[![crates.io](https://img.shields.io/crates/v/openrr-sleep.svg)](https://crates.io/crates/openrr-sleep) [![docs](https://docs.rs/openrr-sleep/badge.svg)](https://docs.rs/openrr-sleep) [![docs](https://img.shields.io/badge/docs-main-blue)](https://openrr.github.io/openrr/openrr_sleep)
3+
[![crates.io](https://img.shields.io/crates/v/scoped-sleep.svg)](https://crates.io/crates/scoped-sleep) [![docs](https://docs.rs/scoped-sleep/badge.svg)](https://docs.rs/scoped-sleep)
4+
5+
RAII sleep
46

57
## License
68

src/scoped_sleep.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl ScopedSleep {
1111
/// let now = std::time::Instant::now();
1212
/// {
1313
/// // Do not use `let _ = ..` here because it immediately drops ScopedSleep.
14-
/// let _guard = openrr_sleep::ScopedSleep::new(std::time::Duration::from_millis(100));
14+
/// let _guard = scoped_sleep::ScopedSleep::new(std::time::Duration::from_millis(100));
1515
/// // not sleep yet
1616
/// assert!(now.elapsed() < std::time::Duration::from_millis(20));
1717
/// }
@@ -31,7 +31,7 @@ impl ScopedSleep {
3131
/// let now = std::time::Instant::now();
3232
/// {
3333
/// // Do not use `let _ = ..` here because it immediately drops ScopedSleep.
34-
/// let _guard = openrr_sleep::ScopedSleep::from_secs(0.1);
34+
/// let _guard = scoped_sleep::ScopedSleep::from_secs(0.1);
3535
/// // not sleep yet
3636
/// assert!(now.elapsed() < std::time::Duration::from_millis(10));
3737
/// }

0 commit comments

Comments
 (0)