Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: correct example invocation command example #27

Merged
merged 2 commits into from
May 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -6,17 +6,19 @@ on:
branches:
- main
- develop
- 'dev/**'
- "dev/**"
paths:
- 'src/**'
- "src/**"
- "examples/**"

pull_request:
branches:
- main
- develop
- 'dev/**'
- "dev/**"
paths:
- 'src/**'
- "src/**"
- "examples/**"

jobs:
code-coverage:
@@ -45,8 +47,8 @@ jobs:
command: test
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: '-Cinstrument-coverage'
LLVM_PROFILE_FILE: './target/coverage.prof/cargo-test-%p-%m.profraw'
RUSTFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "./target/coverage.prof/cargo-test-%p-%m.profraw"

- name: Install grcov
run: |
@@ -83,4 +85,3 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features

8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -53,7 +53,13 @@ order they need.
## Examples

Find examples demonstrating different capabilities of `laminarmq` in the
[examples](./examples) directory.
[examples](https://github.com/arindas/laminarmq/tree/main/examples) directory.

Invoke any example as follows:

```sh
cargo run --example <example-name> --release
```

## Media

2 changes: 1 addition & 1 deletion examples/laminarmq-tokio-commit-log-server/README.md
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ const DEFAULT_STORAGE_DIRECTORY: &str = "./.storage/laminarmq_tokio_commit_log_s
You may specify it as follows:

```sh
STORAGE_DIRECTORY="<storage directory>" cargo run --release
STORAGE_DIRECTORY="<storage directory>" cargo run --example laminarmq-tokio-commit-log-server --release
```

Once the server is running you may make requests as follows:

Unchanged files with check annotations Beta

drop(self.writer);
let reader =
Arc::<_>::into_inner(self.reader).ok_or(StdRandomReadFileStorageError::StdFileInUse)?;

Check warning on line 171 in src/storage/impls/tokio/storage/std_random_read.rs

GitHub Actions / clippy

current MSRV (Minimum Supported Rust Version) is `1.62.0` but this item is stable since `1.70.0`

warning: current MSRV (Minimum Supported Rust Version) is `1.62.0` but this item is stable since `1.70.0` --> src/storage/impls/tokio/storage/std_random_read.rs:171:13 | 171 | Arc::<_>::into_inner(self.reader).ok_or(StdRandomReadFileStorageError::StdFileInUse)?; | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
tokio::task::spawn_blocking(|| drop(reader))
.await
}
let (_, (index, _)) = storage_map
.last_key_value()

Check warning on line 53 in src/storage/impls/in_mem/segment.rs

GitHub Actions / clippy

current MSRV (Minimum Supported Rust Version) is `1.62.0` but this item is stable since `1.66.0`

warning: current MSRV (Minimum Supported Rust Version) is `1.62.0` but this item is stable since `1.66.0` --> src/storage/impls/in_mem/segment.rs:53:18 | 53 | .last_key_value() | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv = note: `#[warn(clippy::incompatible_msrv)]` on by default
.ok_or(InMemStorageError::StorageNotFound)?;
if !index
}
storage_map
.pop_last()

Check warning on line 65 in src/storage/impls/in_mem/segment.rs

GitHub Actions / clippy

current MSRV (Minimum Supported Rust Version) is `1.62.0` but this item is stable since `1.66.0`

warning: current MSRV (Minimum Supported Rust Version) is `1.62.0` but this item is stable since `1.66.0` --> src/storage/impls/in_mem/segment.rs:65:18 | 65 | .pop_last() | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
.ok_or(InMemStorageError::StorageNotFound)?;
}